gzip

gzip

Purpose

Compress one or more files.

Syntax

gzip [options] files

Options

-c writes output to standard output and retains the original file.

-d decompresses the file (same as ).

-h displays a Help message.

-l lists the contents of a compressed file.

-n does not save the original name and time stamp.

-r recursively compresses files in all subdirectories.

-v displays verbose output.

-V displays the version number.

Description

The gzip command compresses files using Lempel-Ziv (LZ77) coding, which produces better compression than the algorithm the command uses. After compressing a file, gzip replaces the original file with the compressed version and appends a .gz to the filename.