Compress is the traditional Unix file compression method, which uses the LZW compression algorithm. The compress program by default replaces each input file with a compressed file that has a .Z extension. To decompress .Z files, use uncompress or gunzip. Originally, the zcat program was part of compress, but on most Linux systems it points to gzip.
compress [options] filename uncompress [options] filename
- -d: Decompress even if compress is invoked.
- -f: Overwrite files without asking for confirmation.
- -c: Write to the standard output.
- -r: Recursively compress files in given directories.
- -V: Show the version number.