O'Reilly logo

Mac OS X Tiger in a Nutshell by Jason McIntosh, Chuck Toporek, Chris Stone, Andy Lester

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

gzip

Synopsis

gzip [options] [files]
gunzip [options] [files]
zcat [options] [files]

Compresses specified files (or read from standard input) with Lempel-Ziv coding (LZ77). Renames compressed file to filename .gz; keeps ownership modes and access/modification times. Ignores symbolic links. Uncompresses 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.

gzip doesn't preserve resource forks or HFS metadata when compressing files that contain them.

Options

-1 .. -9, --fast, --best

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.

-c, --stdout, --to-stdout

Print output to standard output, and don't change input files.

-d, --decompress, --uncompress

Same as gunzip.

-f, --force

Force compression. gzip normally prompts 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.

-h, --help

Display a help screen and then exit.

-l, --list

Expects to be given compressed files as arguments. Files may be compressed by any of the following methods: gzip, deflate, compress, lzh, and pack. For each file, list uncompressed and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required