Name

gzip

Synopsis

    gzip [options] [files]

GNU Zip. Reduce the size of one or more files using Lempel-Ziv (L Z 7 7) coding, and move to file .gz. Restore with gunzip. With a filename of -, or with no files, gzip reads standard input. Usually, compression is considerably better than that provided by the old compress command. Furthermore, the algorithm is patent-free. Today, gzip is the de-facto compression software used throughout the Internet. (Although bzip2 is also popular, see bzip2.)

gzip ignores symbolic links. The original file’s name, permissions, and modification time are stored in the compressed file, and restored when the file is uncompressed. gzip is capable of uncompressing files that were compressed with compress, pack, or the BSD compact. Default options may be placed in the environment variable GZIP.

gunzip is equivalent to gzip -d. It is typically a hard link to the gzip command. gzcat and zcat are equivalent to gunzip -c, and are also often hard links to gzip.

Additional related commands include gzcmp, which compares the contents of gzipped files; gzdiff, which creates diff (difference) files from a pair of gzip files; gzgrep, to search them; and the gzless and gzmore commands, which apply the more and less commands to gzip output as gzcat does with the cat command. See cat, cmp, diff, grep, less, and more for information on how to use those commands.

URL: http://www.gzip.org.

Options

-a, --ascii

ASCII text mode: convert end-of-lines using local conventions. Not supported ...

Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.