Go to the previous, next section.

Compressing files

compress uses Lempel-Ziv-Welsh coding for compressing files. Most files can be compressed to half of their original size thus saving on disk space. You should compress any files that you do not use frequently as this will help keep from going over your disk space limits. compress is executed as follows, with filename being replaced with the name of the file (or files) to be compressed.

compress filename

The compressed file is stored under the name `filename.Z'. The `.Z' extension on the filename lets you know that this is a compressed file. Remember that any compressed file must be treated as a binary file for purposes of file transfer.

In order to uncompress a file, use the uncompress command. The resulting uncompressed file will be without the `.Z' extension.

uncompress filename.Z

You can use the command zcat to look at a compressed file without uncompressing it. A typical way to look at a compressed text file is as follows:

zcat filename | more

Go to the previous, next section.