\input texinfo @c -*-texinfo-*-
@c %**start of header
@setfilename gzip.info
+@documentencoding UTF-8
@include version.texi
-@settitle Gzip User's Manual
+@settitle GNU Gzip
@finalout
@setchapternewpage odd
@c %**end of header
@copying
-This manual is for Gzip
+This manual is for GNU Gzip
(version @value{VERSION}, @value{UPDATED}),
and documents commands for compressing and decompressing data.
-Copyright @copyright{} 1998, 1999, 2001, 2002, 2006, 2007 Free
-Software Foundation, Inc.
+Copyright @copyright{} 1998--1999, 2001--2002, 2006--2007, 2009--2014
+Free Software Foundation, Inc.
Copyright @copyright{} 1992, 1993 Jean-loup Gailly
@quotation
Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2 or
+under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Texts. A copy of the license is included in the section entitled ``GNU
@end quotation
@end copying
-@c Debian install-info (up through at least version 1.9.20) uses only the
-@c first dircategory. But install-info 1.10.28 rejects any attempt to
-@c put the more-useful individual utility first. So put the less-useful
-@c general category first.
-@dircategory Utilities
+@dircategory Compression
@direntry
-* Gzip: (gzip). The gzip command for compressing files.
+* Gzip: (gzip). General (de)compression of files (lzw).
@end direntry
@dircategory Individual utilities
@direntry
-* gzip: (gzip)Invoking gzip. Compress files.
+* gunzip: (gzip)Overview. Decompression.
+* gzexe: (gzip)Overview. Compress executables.
+* zcat: (gzip)Overview. Decompression to stdout.
+* zdiff: (gzip)Overview. Compare compressed files.
+* zforce: (gzip)Overview. Force .gz extension on files.
+* zgrep: (gzip)Overview. Search compressed files.
+* zmore: (gzip)Overview. Decompression output by pages.
@end direntry
@titlepage
-@title gzip
+@title GNU gzip
@subtitle The data compression program
-@subtitle for Gzip Version @value{VERSION}
+@subtitle for Gzip version @value{VERSION}
@subtitle @value{UPDATED}
@author by Jean-loup Gailly
@ifnottex
@node Top
-@top Compressing Files
+@top GNU Gzip: General file (de)compression
@insertcopying
@end ifnottex
* Tapes:: Using @command{gzip} on tapes.
* Problems:: Reporting bugs.
* GNU Free Documentation License:: Copying and sharing this manual.
-* Concept Index:: Index of concepts.
+* Concept index:: Index of concepts.
@end menu
@node Overview
@chapter Overview
@cindex overview
-@command{gzip} reduces the size of the named files using Lempel-Ziv coding
+@command{gzip} reduces the size of the named files using Lempel--Ziv coding
(LZ77). Whenever possible, each file is replaced by one with the
extension @samp{.gz}, while keeping the same ownership modes, access and
modification times. (The default extension is @samp{-gz} for @abbr{VMS},
@samp{z} for @abbr{MSDOS}, @abbr{OS/2} @abbr{FAT} and Atari.)
If no files are specified or
-if a file name is "-", the standard input is compressed to the standard
+if a file name is @file{-}, the standard input is compressed to the standard
output. @command{gzip} will only attempt to compress regular files. In
particular, it will ignore symbolic links.
also allows some consistency checks.
Files created by @command{zip} can be uncompressed by @command{gzip} only if
-they have a single member compressed with the 'deflation' method. This
+they have a single member compressed with the ``deflation'' method. This
feature is only intended to help conversion of @file{tar.zip} files to
the @file{tar.gz} format. To extract a @command{zip} file with a single
member, use a command like @samp{gunzip <foo.zip} or @samp{gunzip -S
will uncompress files that have the correct magic number whether they
have a @samp{.gz} suffix or not.
-@command{gzip} uses the Lempel-Ziv algorithm used in @command{zip} and
+@command{gzip} uses the Lempel--Ziv algorithm used in @command{zip} and
@abbr{PKZIP}@.
The amount of compression obtained depends on the size of the input and
the distribution of common substrings. Typically, text such as source
-code or English is reduced by 60-70%. Compression is generally much
+code or English is reduced by 60--70%. Compression is generally much
better than that achieved by @abbr{LZW} (as used in @command{compress}), Huffman
coding (as used in @command{pack}), or adaptive Huffman coding
(@command{compact}).
disk blocks almost never increases. @command{gzip} normally preserves the mode,
ownership and time stamps of files when compressing or decompressing.
-The @command{gzip} file format is specified in P. Deutsch, @sc{gzip} file
+The @command{gzip} file format is specified in P. Deutsch, GZIP file
format specification version 4.3,
-@uref{ftp://ftp.isi.edu/in-notes/rfc1952.txt, Internet @abbr{RFC} 1952} (May
+@uref{http://www.ietf.org/rfc/rfc1952.txt, Internet @abbr{RFC} 1952} (May
1996). The @command{zip} deflation format is specified in P. Deutsch,
-@sc{deflate} Compressed Data Format Specification version 1.3,
-@uref{ftp://ftp.isi.edu/in-notes/rfc1951.txt, Internet @abbr{RFC} 1951} (May
+DEFLATE Compressed Data Format Specification version 1.3,
+@uref{http://www.ietf.org/rfc/rfc1951.txt, Internet @abbr{RFC} 1951} (May
1996).
@node Sample
-@chapter Sample Output
+@chapter Sample output
@cindex sample
Here are some realistic examples of running @command{gzip}.
-d, --decompress decompress
-f, --force force overwrite of output file and compress links
-h, --help give this help
+ -k, --keep keep (don't delete) input files
-l, --list list compressed file contents
-L, --license display software license
-n, --no-name do not save or restore the original name and time stamp
find . -name '*
*' -prune -o -name '*.gz' -type f -print |
sed "
- s/'/'\\''/g
+ s/'/'\\\\''/g
s/^\\(.*\\)\\.gz$/gunzip <'\\1.gz' >'\\1'/
" |
sh -e
@itemx -h
Print an informative help message describing the options then quit.
+@item --keep
+@itemx -k
+Keep (don't delete) input files during compression or decompression.
+
@item --list
@itemx -l
For each compressed file, list the following fields:
@include fdl.texi
-@node Concept Index
-@appendix Concept Index
+@node Concept index
+@appendix Concept index
@printindex cp