GNU/Linux Command – ZIP

zip — Package and Compress files in Zip format.
 
Summary:
 
zip is a compression and file packaging utility. The zip program puts one or more compressed files into a single zip archive, along with information about the files.
 
Example:
$ zip stuff * -- Create stuff.zip, add current Dir files in it.  $ zip -r myzip mydir -- Create myzip.zip, add mydir files in it. $ zip -j myzip mydir/* -- Same as above. But mydir name willnot be recorded.  $ zip -rm myzip mydir -- Delete the original files after zipping. $ zip -r myzip mdir -x *~ -- Exclude all files that end in ~.  $ zip -u stuff * -- If myzip.zip is already exist then, update newand modified files from the current Dir.  $ zip -R foo '*.c' -- Travel the Dirs recursively starting at the  current directory and zip all C files.  $ zip -n .Z:.zip:.tiff:.gif:.snd myzip * -- Create myzip.zip, addfiles from current Dir, but don't compress the specified files.  $ zip -rt 2009-06-06 myzip mydir -- Zip all the files in foo andits subdirs that were last modified on or AFTER 06-06-2009.  $ zip -rtt 2009-06-06 myzip mydir -- Zip all the files in foo andits subdirs that were last modified BEFORE 06-06-2009.
Read: man zip (Lot of examples are available)

Advertisements
Tagged with: ,
Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: