Developer's Daily Unix by Example
  main | java | perl | unix | DevDirectory
   
Main
Unix
Education
Unix by Example
   

 

Command compress
Description The "compress" command is used to compress files. It's function is similar to PkZIP in the DOS/Windows world.

Notes: The compressed file replaces the original file, and a new filename is created by adding a ".Z" extension to the original filename. (See the examples below.)

Examples compress /tmp/myfiles.tar

This command compresses the file /tmp/myfiles.tar, and replaces it with a file named /tmp/myfiles.tar.Z.

compress -v /tmp/myfiles.tar

This command works just like the previous example, but gives more verbose output during the compression process. This is useful if you like to see the compression ratio you're getting with this utility.

(You'll usually get compression ratios approaching 30-40%, but that also depends on the type of file you're trying to compress. Text files will compress much more than binary files.)

 


What's related

copyright 1998-2007, devdaily.com, all rights reserved.
devdaily.com, an alvin j. alexander production.