
200
|
Chapter 3: Linux Commands
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
gzip
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.
Options
-n, --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.
-a, --ascii
ASCII text mode: convert end-of-lines using local conven-
tions. This option is supported only on some non-Unix
systems.
-c, --stdout, --to-stdout
Print output to standard output, and do not change input files.
-d, --decompress, --uncompress
Same as gunzip.
-f, --force
Force compression. gzip would normally prompt for permis-
sion to continue when the file has multiple links, its .gz
version already exists, or it is reading compressed data to or
from a terminal.