👤
Home Man
Search
Today's Posts
Register

This forum is closed for new posts. Please post beginner questions to learn unix and learn linux in this forum UNIX for Beginners Questions & Answers

zip error

 

 
Thread Tools Search this Thread
# 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-05-2008 at 11:15 PM..
# 2  
Old 06-05-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
 

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How can we Zip multiple files created on the same date into one single zip file.? b.saipriyanka Shell Programming and Scripting 1 01-30-2017 12:47 PM
How can we Zip multiple files created on the same date into one single zip file.? b.saipriyanka UNIX for Beginners Questions & Answers 2 01-30-2017 09:37 AM
Need Script to ZIP/SAVE & then DELETE Log file & send a mail conformation for any error admin_job_admin Shell Programming and Scripting 1 03-16-2015 02:41 AM
Zip Error : Nothing to do !(<ZipName>) C_PRASANNA UNIX for Dummies Questions & Answers 4 02-26-2014 08:37 AM
Zip Multiple files to One .zip file in AIX system RAMA PULI Shell Programming and Scripting 9 04-29-2013 12:11 PM
Zip a file with .zip extension. aeroticman UNIX for Dummies Questions & Answers 1 08-04-2010 01:54 PM
ZIP multiple files and also specify size of zip file tom007 AIX 1 03-16-2010 02:29 AM
Zip command (zip folder doesn't include a folder of the same name) elioncho UNIX for Dummies Questions & Answers 1 03-12-2009 03:19 PM
unzip .zip file and list the files included in the .zip archive oracledev UNIX for Dummies Questions & Answers 5 04-08-2008 04:49 PM
Zip Error gelbvonn UNIX for Dummies Questions & Answers 0 04-29-2004 06:00 AM


All times are GMT -4. The time now is 05:13 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
×
UNIX.COM Login
Username:
Password:  
Show Password