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 Unix compress command examples.
Unix compress command examples
The following command will compress the file named foo.tar into a new file named foo.tar.Z:
This command compresses the file named foo.tar, and replaces it will a file named foo.tar.Z. (Your original foo.tar file will no longer exist.)