zip error


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers zip error
# 1  
Old 06-04-2008
zip error

Having problems using the -m option when zipping up a file

# zip -m test *.jpg

zip error: Invalid command arguments (no such option: .)

# zip -m test.jpg *.jpg

zip error: Invalid command arguments (no such option: .)



any clue on what is causing this error?

It used to work when zipping up a large number of files with the same extension.

Is the -m option being used wrong or?

thanks!

Last edited by mcraul; 06-06-2008 at 12:15 AM..
# 2  
Old 06-06-2008
bump


thanks!
# 3  
Old 06-06-2008
Why would you want to use -m option? don't use that. Just use a simple "zip" and it will work.

-m Move the specified files into the zip archive; actu-
ally, this deletes the target directories/files after
making the specified zip archive. If a directory
becomes empty after removal of the files, the directory
is also removed. No deletions are done until zip has
created the archive without error. This is useful for
conserving disk space, but is potentially dangerous
so
it is recommended to use it in combination with -T to
test the archive before removing all input files.
# 4  
Old 06-06-2008
Does *.jpg expand to something which looks like an option to zip? I.e. what does echo *.jpg say, is there a file there whose name starts with a dash?
# 5  
Old 06-06-2008
actually there was a couple .jpg files that started with a -
would this affect the process? I think it does or did. Now what we did was delete and recreate the whole directory, populated it with .jpg's again and did the zip -m filename *.jpg

and it bombed like before. But I cant reproduce the other in other directories wich is strange indeed.
# 6  
Old 06-09-2008
If you say zip -funnyfile.jpg then it will think "-funnyfile.jpg" is an option string, and complain. The customary solution is to disambiguate it with an explicit path name, like zip ./-funnyfile.jpg
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Arg list too long error while performing tar and zip operation

hi all i am trying to tar and then zip files present dir by using the below command tar -cvf ${abc}/xyz_backup_date_`date +%d%m%y%H%M%S`.tar xyz* when the files are in less number the above command executes perfectly but when there are large number of files i am getting "arg list too... (5 Replies)
Discussion started by: manoj
5 Replies

2. 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

3. 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

4. UNIX for Dummies Questions & Answers

Zip Error : Nothing to do !(<ZipName>)

Hi Guys, I faced this Error in my Unix System while i trying to zip a File "zip error: Nothing to do! (<ZipName>)" Why such thing happen in the Unix, whats the reason behind it . Please let me know !!! (4 Replies)
Discussion started by: C_PRASANNA
4 Replies

5. 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

6. UNIX for Dummies Questions & Answers

Zip a file with .zip extension.

Hi, I need to zip a .dat file with .zip extension. I tried using the "zip" command. But shell says. "ksh: zip: not found" Currently I am using gunzip to zip and changing the extension ".gz" to ".zip" as follows. mv $file `echo $file | sed 's/\(.*\.\)gz/\1zip/'` But when I tried... (1 Reply)
Discussion started by: aeroticman
1 Replies

7. 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

8. UNIX for Dummies Questions & Answers

Zip command (zip folder doesn't include a folder of the same name)

Hi guys, I have a question about the zip command. Right now I have a directory with some files and folders on it that I want to compress. When I run the zip command: zip foo -r I am getting a foo.zip file that once I unzip it contains a foo folder. I want to create the foo.zip, but that... (1 Reply)
Discussion started by: elioncho
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

10. UNIX for Dummies Questions & Answers

Zip Error

Hi I would like to zip a directory of files while using "gzip *.*" or "ls | xargs gzip" both prompted me arg list too long. Can someone kindly advise me on how o overcome this. Thank you! (0 Replies)
Discussion started by: gelbvonn
0 Replies
Login or Register to Ask a Question