How to zip each of the files?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to zip each of the files?
# 22  
Old 06-28-2011
panyam: zip warning: missing end signature--probably not a zip file (did you
zip warning: remember to use binary mode when you transferred it?)
zip warning: (if you are trying to read a damaged archive try -F)


Rksiva: It works yet that's not what I want. I need each of the files in their own zip file. This puts all under one :/
# 23  
Old 06-28-2011
Quote:
One more question; how do I do this into .zip, not .gz? The program I'm tryin to import these files into does not accept gzip.
On the target computer, what Operating System are you running and what version of "zip"/"unzip" ?
When copying the zip file from the unix server to the target computer, what method did you use for the copy?
# 24  
Old 06-28-2011
My last try

Code:
 
while read file
do
zip ${file}".zip" ${file} 
done < ls "*.epub"

# 25  
Old 06-28-2011
Try this out,
Code:
find . -name "*.jpg" | awk -F'/' '{ print $NF }' | sed 's/\(.*\)\.\(jpg\)/zip \1\.zip \1.txt/g' | sh


Last edited by Franklin52; 06-28-2011 at 02:14 PM.. Reason: Please use code tags, thank you
# 26  
Old 06-28-2011
panyam: bash: syntax error near unexpected token `"*.epub"'

rksiva: zip warning: name not matched: Carlson.zip
and more of these warnings

methyl: Arch Linux with zip 3.0

I took the long way and Right Click > Compress'ed all the files...
# 27  
Old 06-28-2011
Can u please provide us some sample epub filenames?
# 28  
Old 06-28-2011
All the filenames;

Quote:
Behcet Canturk'un Anilari - Soner Yalcin.epub
Belgelerle Ergenekon - Saygi Ozturk.epub
Binbasi Ersever'in Itiraflari - Soner Yalcin.epub
Binbogalar Efsanesi - Yasar Kemal.epub
Borclu Olduklarimiz - Aziz Nesin.epub
Bu Dinciler O Muslumanlara Benzemiyor - Soner Yalcin.epub
Bu Diyar Bastan Basa - Yasar Kemal.epub
Butun Kaleler Zaptedilmedi - Atilla Ilhan - Hulki Cevizoglu.epub
Butun Siirleri - Orhan Veli.epub
Buyuk Uyanis - Oktay Sinanoglu.epub
Bye Bye Turkce - Oktay Sinanoglu.epub
Cagin Sucu - Ugur Mumcu.epub
Calikusu - Resat Nuri Guntekin.epub
Camasircinin Kizi - Orhan Kemal.epub
Cankaya - Falih Rifki Atay.epub
Cumhuriyetin Ilk Yillari - 1 - Ismet Inonu.epub
Cumhuriyetin Ilk Yillari - 2 - Ismet Inonu.epub
Denemeler - Montaigne.epub
Devlet Ana - Kemal Tahir.epub
Devlet Silah Adalet - Ugur Mumcu.epub
Dinle Kucuk Adam - Wilhelm Reich.epub
Dogudaki Hayalet - Pierre Loti.epub
Dort Incil, Farkliliklari ve Celiskileri - Saban Kuzgun.epub
Dunu Bugunu ile 68'liler - Hulki Cevizoglu.epub
Dusunce Tarihi - Orhan Hancerlioglu.epub
Dusunuyorum Oyleyse Vurun - Ilhan Selcuk.epub
Efendi 2, Beyaz Muslumanlarin Buyuk Sirr - Soner Yalcin.epub
Efendi - Soner Yalcin.epub
FIHI MA-FIH - Mevlana (Cev.Abdulbaki Golpinarli).epub
Gilgamis Destani - Muzaffer Ramazanoglu.epub
Hedef Turkiye - Oktay Sinanoglu.epub
Ilk ABD Buyukelcisinin Turkiye Hatiralar - John Grew.epub
Ince Memed 1 - Yasar Kemal.epub
Isgal Ve Direnis 1919 Ve Bugun - Hulki Cevizoglu.epub
Istanbul Esintileri - Aydin Boysan.epub
Kapital, Cilt1 - Karl Marks.epub
Kapital, Cilt2 - Karl Marks.epub
Kapital, Cilt3 - Karl Marks.epub
Kavgam - Adolf Hitler.epub
Kazim Karabekir Anlatiyor - Ugur Mumcu.epub
Kelile ve Dimne - Beydeba.epub
Kitaplarina Girmeyen Siirler - Orhan Veli.epub
Komunist Parti Manifestosu - Friedrich Engels_ Karl Marx.epub
Kontrgerilla Ogretileri - Ugur Mumcu.epub
Kostebek - Necip Hablemitoglu.epub
Kuran Meali - Yasar Nuri Ozturk.epub
Kurtulus Savasi Sirasinda Turk Milliyetc - Berthe Georges Gaulis.epub
Kuvayi Milliye - Nazim Hikmet.epub
Luzumsuz Bilgiler Ansiklopedisi 1 - Tamer Korugan.epub
Luzumsuz Bilgiler Ansiklopedisi 2 - Tamer Korugan.epub
Makalat - Semsi Tebrizi.epub
Medeniyetler Catismasi - Samuel Huntington.epub
Memleketin Birinde - Aziz Nesin.epub
Mesnevi - 1.Cilt - Mevlana Celaleddin Rumi.epub
Mesnevi - 2.Cilt - Mevlana Celaleddin Rumi.epub
Mesnevi - 3.Cilt - Mevlana Celaleddin Rumi.epub
Mesnevi - 4.Cilt - Mevlana Celaleddin Rumi.epub
Mesnevi - 5.Cilt - Mevlana Celaleddin Rumi.epub
Mesnevi - 6.Cilt - Mevlana Celaleddin Rumi.epub
Mesrutiyet Kiraathanesi - Rifat Ilgaz.epub
Milli Istihbarat Teskilati - Tuncay Ozkan.epub
Mustafa Kemal'in Mutareke Defteri - Falih Rifki Atay.epub
Nutuk - Ataturk.epub
Olagan Isler - Resat Nuri Guntekin.epub
Oldurun O Gazeteciyi - Tuncay Ozkan.epub
Operasyon - Tuncay Ozkan.epub
Osmanli Devleti 1300-1600 - Cesitli.epub
Osmanli Devleti 1600-1908 - Cesitli.epub
Osmanli Devletine Kadar Turkler - Cesitli.epub
Osmanli Padisahlari - Anonim.epub
Rengahenk - Can Yucel.epub
Rubailer - Omer Hayyam.epub
Sakincali Piyade - Ugur Mumcu.epub
Simdiki Cocuklar Harika - Aziz Nesin.epub
Sizin Memlekette Esek Yokmu - Aziz Nesin.epub
Siz Kimi Kandiriyorsunuz - Soner Yalcin.epub
Son Siginak - Resat Nuri Guntekin.epub
Sorgulayan Denemeler - Bertrand Russell.epub
Su Cilgin Turkler - Turgut Ozakman.epub
Tanri Misafiri - Resat Nuri Guntekin.epub
Tarihimizle Yuzlesmek - Emre Kongar.epub
Tatli Betus - Aziz Nesin.epub
Tevrat - Tevrat.epub
Turk Edebiyatinda Unutulamayan Ask Siirl - Derleme.epub
Turklerin Dini - Fuat Bozkurt.epub
Ucgendeki Tezgah - Cem Ersever.epub
Ufak Seyleri Dert Etmeyin - Richard Carlson.epub
Unutulanlar Disinda Yeni Bir Sey Yok - Osman Pamukoglu.epub
Vatan Yahut Silistre - Namik Kemal.epub
Vukuat Var - Orhan Kemal.epub
Yarin Cumhuriyeti Ilan Edecegiz - Nutuktan.epub
Yeniden Insan Insana - Dogan Cuceloglu.epub
Yolsuzluk Siddet Bagimlilik - Ugur Mumcu.epub
Yunus Emre Divani - Yunus Emre.epub
Yunus Emre Siirleri - Yunus Emre.epub
Zebur - Zebur.epub
Zeytindagi - Falih Rifki Atay.epub
For those who wanna know the language; it's Turkish (:
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How can we Zip multiple files created on the same date into one single zip file.?

Hi all i am very new to shell scripting and need some help from you to learn 1)i have some log files that gets generated on daily basis example: i have abc_2017_01_30_1.log ,2017_01_30_2.log like wise so i want to zip this 4 logs which are created on same date into one zip folder. 2)Post zipping... (1 Reply)
Discussion started by: b.saipriyanka
1 Replies

2. UNIX for Beginners Questions & Answers

How can we Zip multiple files created on the same date into one single zip file.?

Hi all i am very new to shell scripting and need some help from you to learn 1)i have some log files that gets generated on daily basis example: i have abc_2017_01_30_1.log ,2017_01_30_2.log like wise so i want to zip this 4 logs which are created on same date into one zip folder. 2)Post zipping... (2 Replies)
Discussion started by: b.saipriyanka
2 Replies

3. Shell Programming and Scripting

Append string to all the files inside a directory excluding subdirectories and .zip files

Hii, Could someone help me to append string to the starting of all the filenames inside a directory but it should exclude .zip files and subdirectories. Eg. file1: test1.log file2: test2.log file3 test.zip After running the script file1: string_test1.log file2: string_test2.log file3:... (4 Replies)
Discussion started by: Ravi Kishore
4 Replies

4. Shell Programming and Scripting

Unzip all the files with subdirectories present and append a part of string from the main .zip files

Hi frnds, My requirement is I have a zip file with name say eg: test_ABC_UH_ccde2a_awdeaea_20150422.zip within that there are subdirectories on each directory we again have .zip files and in that we have files like mama20150422.gz and so on. Iam in need of a bash script so that it unzips... (0 Replies)
Discussion started by: Ravi Kishore
0 Replies

5. Shell Programming and Scripting

Create multiple zip files each containing 50 xml files.

Hi, Is there a direct command or need to write a shell script for following requirement? Everyday a folder is populated with approx 25k to 30k xml files. I need to create multiple zip files in the same folder each containing 50 xml files. The last zip file may or may not contain 50 xml files.... (6 Replies)
Discussion started by: Rakesh Thobula
6 Replies

6. Shell Programming and Scripting

How to create zip/gz/tar files for if the files are older than particular days in UNIX or Linux?

I need a script file for backup (zip or tar or gz) of old log files in our unix server (causing the space problem). Could you please help me to create the zip or gz files for each log files in current directory and sub-directories also? I found one command which is to create gz file for the... (4 Replies)
Discussion started by: Mallikgm
4 Replies

7. Shell Programming and Scripting

Zip Multiple files to One .zip file in AIX system

Hi I have a requirement in unix shell where I need to zip multiple files on server to one single .zip file. I dont see zip command in AIX and gzip command not doing completely what I want. One I do .zip file, I should be able to unzip in my local Computer. Here is example what I want... (9 Replies)
Discussion started by: RAMA PULI
9 Replies

8. AIX

ZIP multiple files and also specify size of zip file

I have to zip many pdf files and the size of zip file must not exceed 200 MB. When size is more than 200 MB then multiple zip files needs to be created. How we can achieve this in UNIX? I have tried ZIP utility but it takes a lot of time when we add individual pdfs by looping through a... (1 Reply)
Discussion started by: tom007
1 Replies

9. UNIX for Dummies Questions & Answers

unzip .zip file and list the files included in the .zip archive

Hello, I am trying to return the name of the resulting file from a .zip archive file using unix unzip command. unzip c07212007.cef7081.zip Archive: c07212007.cef7081.zip SecureZIP for z/OS by PKWARE inflating: CEP/CEM7080/PPVBILL/PASS/G0063V00 I used the following command to unzip in... (5 Replies)
Discussion started by: oracledev
5 Replies
Login or Register to Ask a Question