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 command

UNIX for Dummies Questions & Answers

Thread Tools Search this Thread Display Modes
Old Unix and Linux 04-17-2008
su_in99 su_in99 is offline
Registered User
Join Date: Mar 2007
Last Activity: 18 November 2009, 6:10 PM EST
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
zip command


What is the appropriate command to zip a folder that contain sub folder
and files? Example:
Folder lunaa

In the folder there are a number of folder e.g 01526, etc...which
contains number of file.

Any idea would be grateful.

Many thanks
Sponsored Links
Old Unix and Linux 04-17-2008
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 mean the zip command specifically, it has an -r option to recursively descend into directories.

zip -r lunaa.zip lunaa

On Unix, the traditional archiving software is tar, which in modern versions includes compression options. It will descend into subdirectories by default.

tar zcf lunaa.tar.gz lunaa

Neither of these will remove the folder after you have archived it; if you want that, it's simple enough to rm -rf lunaa after you're done.
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
passing command output from one command to the next command in cshell kaaliakahn UNIX for Dummies Questions & Answers 2 02-10-2012 04:59 PM
unix command : how to insert text at the cursor location via command line? xib.be UNIX for Advanced & Expert Users 0 12-22-2010 05:45 PM
Need help! command working ok when executed in command line, but fails when run inside a script! 4dirk1 Shell Programming and Scripting 4 12-02-2010 05:47 AM
awk command in script gives error while same awk command at prompt runs fine: Why? catalys Shell Programming and Scripting 4 09-20-2010 10:07 PM
awk/sed Command : Parse parameter file / send the lines to the ksh export command rajan_san Shell Programming and Scripting 4 11-06-2008 12:29 PM

All times are GMT -4. The time now is 03:39 AM.