Tuesday 15 September 2020

The Unix compress command

Unix compress command, LPI Tutorial and Material, LPI Exam Prep, LPI Guides

The Unix compress command is rarely used any more, and has largely been replaced by the Unix/Linux gzip and bzip2 commands. However, on some Unix systems the compress command is still used, so for them, here are a few examples of how to use it.

Unix compress command examples


The following command will compress the file named foo.tar into a new file named foo.tar.Z:

compress foo.tar

This command compresses the file named foo.tar, and replaces it will a file named foo.tar.Z. (Very important note: Your original foo.tar file will no longer exist.)

You can also use the -v argument to get more output information during the file compression process, like this:

compress -v foo.tar

This compress 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.

Related Posts

0 comments:

Post a Comment