Jump to navigation Jump to search
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.
Use of this utility is generally discouraged because it's underlying compression algorithm, LZW is patented. Use znew to recompress .Z files to the patent-free gzip format, .gz.
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.