Linux Mall - The Linux SuperStore!
Linux books, Linux CDs, Linux toys, you name it, they have it!

W W W . L I N U X D O T . O R G

Newbie's Linux Manual
Winzip or Linzip? - The zip and unzip Commands
by Laurence Hunter
[ Home ] [ Contents ] [ Download*] [ Previous ] [ Next ]
* In Linux enter: unzip nlm.zip
As Easy as WinZip

Zipping a directory and all of its contents in Linux is extremely easy. Here's the command required, at its most basic:

zip -r zipname path

For example, the following will zip the entire contents of the directory mywork. The resulting zip file will be called myzip.zip:

zip -r myzip mywork

Then to unzip it, simply enter:

unzip myzip
Changing The Compression Rate

By default, the compression rate used, is 6. 0 gathers together all the files but does not compress them, 1 applies the least compression, and 9 applies the maximum compression. The greater the compression, the longer it takes to zip and unzip files.

Here's an example:

zip -r myzip -9 mywork
Winzip's Compression vs. zip's

In case you're curious about the difference in compression rates between Winzip 7.0 and the zip command, I can tell you this. 15 web pages totalled 1.83Mb. The best I could get with Winzip was 620k, and the best I could get with Linux was 623k. That means Winzip has a better compression rate of 0.14%! I'm not about to get picky about it, are you? (And if you're getting out a calculator to check my sums, you definitely need to get out more!)

For More on zip...

For the full nitty-gritty on zip (as with most things in Linux), enter:

info zip

[ Home ] [ Contents ] [ Download*] [ Previous ] [ Next ]
* In Linux enter: unzip nlm.zip
Homepage | The Last 5 Days | The Daily Linux News | The Linux Bits | Newbie's Linux Manual
The Best Linux Sites | Linux Book Reviews | A Windows Vendetta?
Diary of a Linux Newbie | Diary of an Open Source Newbie
The Linux Forum | Just For Fun
Amazon - The World's Biggest Bookstore!
4.7 million books, CDs, videos, and DVDs available to buy!
© MM Linuxdot.org | Webmaster | Manual's Copyright Terms