Linux Command Directory
This directory of Linux commands is from Linux in a Nutshell, 5th Edition.
Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.
gzip [options] [files] gunzip [options] [files] zcat[options] [files]
Compress specified files (or data read from standard input) with Lempel-Ziv coding (LZ77). Rename compressed file to filename.gz; keep ownership modes and access/modification times. Ignore symbolic links. Uncompress with gunzip, which takes all of gzip's options except those specified. zcat is identical to gunzip -c and takes the options -fhLV, described here. Files compressed with the compress command can be decompressed using these commands.
Regulate the speed of compression using the specified digit n, where -1 or --fast indicates the fastest compression method (less compression), and -9 or --best indicates the slowest compression method (most compression). The default compression level is -6.
ASCII text mode: convert end-of-lines using local conventions. This option is supported only on some non-Unix systems.
Print output to standard output, and do not change input files.
Same as gunzip.
Force compression. gzip would normally prompt for permission to continue when the file has multiple links, its .gz version already exists, or it is reading compressed data to or from a terminal.
Display a help screen and then exit.
Expects to be given compressed files as arguments. Files may be compressed by any of the following methods: gzip, deflate, compress, lzh, or pack. For each file, list uncompressed and compressed sizes (the latter being always -1 for files compressed by programs other than gzip), compression ratio, and uncompressed name. With -v, also print compression method, the 32-bit CRC of the uncompressed data, and the timestamp. With -N, look inside the file for the uncompressed name and timestamp.
Display the gzip license and quit.
When compressing, do not save the original filename and timestamp by default. When decompressing, do not restore the original filename if present, and do not restore the original timestamp if present. This option is the default when decompressing.
Default. Save original name and timestamp. When decompressing, restore original name and timestamp.
Print no warnings.
When given a directory as an argument, recursively compress or decompress files within it.
Append .suffix. Default is gz. A null suffix while decompressing causes gunzip to attempt to decompress all specified files, regardless of suffix.
Test compressed file integrity.
Print name and percent size reduction for each file.
Display the version number and compilation options.