Unix/Linux Go Back    


UNIX for Dummies Questions & Answers 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

UNIX for Dummies Questions & Answers


 
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 06-04-2008   -   Original Discussion by mcraul
mcraul's Unix or Linux Image
mcraul mcraul is offline
Registered User
 
Join Date: Mar 2008
Last Activity: 23 March 2010, 1:32 PM EDT
Posts: 81
Thanks: 0
Thanked 0 Times in 0 Posts
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..
Sponsored Links
    #2  
Old Unix and Linux 06-05-2008   -   Original Discussion by mcraul
mcraul's Unix or Linux Image
mcraul mcraul is offline
Registered User
 
Join Date: Mar 2008
Last Activity: 23 March 2010, 1:32 PM EDT
Posts: 81
Thanks: 0
Thanked 0 Times in 0 Posts
bump


thanks!
Sponsored Links
    #3  
Old Unix and Linux 06-06-2008   -   Original Discussion by mcraul
incredible's Unix or Linux Image
incredible incredible is offline Forum Advisor  
Registered User
 
Join Date: May 2008
Last Activity: 24 August 2014, 5:15 AM EDT
Location: SINGAPORE.. The "FINE" City
Posts: 2,693
Thanks: 1
Thanked 19 Times in 19 Posts
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 Unix and Linux 06-06-2008   -   Original Discussion by mcraul
era's Unix or Linux Image
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
 
Join Date: Mar 2008
Last Activity: 28 March 2011, 6:41 AM EDT
Location: /there/is/only/bin/sh
Posts: 3,653
Thanks: 0
Thanked 11 Times in 9 Posts
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?
Sponsored Links
    #5  
Old Unix and Linux 06-06-2008   -   Original Discussion by mcraul
mcraul's Unix or Linux Image
mcraul mcraul is offline
Registered User
 
Join Date: Mar 2008
Last Activity: 23 March 2010, 1:32 PM EDT
Posts: 81
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Sponsored Links
    #6  
Old Unix and Linux 06-09-2008   -   Original Discussion by mcraul
era's Unix or Linux Image
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
 
Join Date: Mar 2008
Last Activity: 28 March 2011, 6:41 AM EDT
Location: /there/is/only/bin/sh
Posts: 3,653
Thanks: 0
Thanked 11 Times in 9 Posts
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
Sponsored Links
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
> 5 ")syntax error: operand expected (error token is " error metal005 UNIX for Dummies Questions & Answers 4 05-09-2011 10:30 AM
Error: msgcnt 1 vxfs: mesg 016: vx_ilisterr - / file system error reading AndryMB SCO 1 07-13-2010 06:49 AM
fssnap error :snapshot error: File system could not be write locked aggadtech08 Solaris 2 09-15-2009 10:12 AM
awk Shell Script error : "Syntax Error : `Split' unexpected Herry UNIX for Dummies Questions & Answers 2 03-17-2008 11:16 AM
Error: Internal system error: Unable to initialize standard output file firkus UNIX for Dummies Questions & Answers 2 10-25-2005 03:23 PM



All times are GMT -4. The time now is 04:16 PM.