document mingw linker fix and close associated bug
[debian/gzip] / gzip.1
diff --git a/gzip.1 b/gzip.1
index 4457856137ed1d63779aa780bac09f53839ce9d3..6594b7553f1984dcd0c4d5fd5d887398726e892e 100644 (file)
--- a/gzip.1
+++ b/gzip.1
@@ -4,7 +4,7 @@ gzip, gunzip, zcat \- compress or expand files
 .SH SYNOPSIS
 .ll +8
 .B gzip
-.RB [ " \-acdfhlLnNrtvV19 " ]
+.RB [ " \-acdfhklLnNrtvV19 " ]
 .RB [ \-S\ suffix ]
 [
 .I "name \&..."
@@ -12,7 +12,7 @@ gzip, gunzip, zcat \- compress or expand files
 .ll -8
 .br
 .B gunzip
-.RB [ " \-acfhlLnNrtvV " ]
+.RB [ " \-acfhklLnNrtvV " ]
 .RB [ \-S\ suffix ]
 [
 .I "name \&..."
@@ -28,11 +28,9 @@ gzip, gunzip, zcat \- compress or expand files
 reduces the size of the named files using Lempel-Ziv coding (LZ77).
 Whenever possible,
 each file is replaced by one with the extension
-.B "\&.gz,"
+.BR "\&.gz" ,
 while keeping the same ownership modes, access and modification times.
 (The default extension is
-.B "\-gz"
-for VMS,
 .B "z"
 for MSDOS, OS/2 FAT, Windows NT FAT and Atari.)
 If no files are specified, or if a file name is "-", the standard input is
@@ -58,21 +56,21 @@ keeps the original file name and timestamp in the compressed file. These
 are used when decompressing the file with the
 .B \-N
 option. This is useful when the compressed file name was truncated or
-when the time stamp was not preserved after a file transfer.
+when the timestamp was not preserved after a file transfer.
 .PP
 Compressed files can be restored to their original form using
 .I gzip -d
 or
 .I gunzip
 or
-.I zcat.
+.IR zcat .
 If the original name saved in the compressed file is not suitable for its
 file system, a new name is constructed from the original one to make it
 legal.
 .PP
 .I gunzip
 takes a list of files on its command line and replaces each
-file whose name ends with .gz, -gz, .z, -z, _z or .Z
+file whose name ends with .gz, -gz, .z, -z, or _z (ignoring case)
 and which begins with the correct magic number with an uncompressed
 file without the original extension.
 .I gunzip
@@ -95,14 +93,19 @@ extension.
 .PP
 .I gunzip
 can currently decompress files created by
-.I gzip, zip, compress, compress -H
+.IR gzip ,
+.IR zip ,
+.IR compress ,
+.I "compress -H"
 or
-.I pack.
+.IR pack .
 The detection of the input format is automatic.  When using
 the first two formats,
 .I gunzip
 checks a 32 bit CRC. For
-.I pack, gunzip
+.I pack
+and
+.I gunzip
 checks the uncompressed length. The standard
 .I compress
 format was not designed to allow consistency checks. However
@@ -131,18 +134,18 @@ To extract zip files
 with several members, use
 .I unzip
 instead of
-.I gunzip.
+.IR gunzip .
 .PP
 .I zcat
 is identical to
 .I gunzip
-.B \-c.
+.BR \-c .
 (On some systems,
 .I zcat
 may be installed as
 .I gzcat
 to preserve the original link to
-.I compress.)
+.IR compress .)
 .I zcat
 uncompresses either a list of files on the command line or its
 standard input and writes the uncompressed data on standard output.
@@ -176,17 +179,6 @@ number of used disk blocks almost never increases.
 .I gzip
 preserves the mode, ownership and timestamps of files when compressing
 or decompressing.
-.PP
-The
-.I gzip
-file format is specified in P. Deutsch, \s-1GZIP\s0 file format
-specification version 4.3, <ftp://ftp.isi.edu/in-notes/rfc1952.txt>,
-Internet RFC 1952 (May 1996).  The
-.I zip
-deflation format is specified in P. Deutsch, \s-1DEFLATE\s0 Compressed
-Data Format Specification version 1.3,
-<ftp://ftp.isi.edu/in-notes/rfc1951.txt>, Internet RFC 1951 (May 1996).
-
 .SH OPTIONS
 .TP
 .B \-a --ascii
@@ -208,12 +200,12 @@ Force compression or decompression even if the file has multiple links
 or the corresponding file already exists, or if the compressed data
 is read from or written to a terminal. If the input data is not in
 a format recognized by
-.I gzip,
+.IR gzip ,
 and if the option --stdout is also given, copy the input data without change
-to the standard ouput: let
+to the standard output: let
 .I zcat
 behave as
-.I cat.
+.IR cat .
 If
 .B \-f
 is not given,
@@ -224,6 +216,9 @@ prompts to verify whether an existing file should be overwritten.
 .B \-h --help
 Display a help screen and quit.
 .TP
+.B \-k --keep
+Keep (don't delete) input files during compression or decompression.
+.TP
 .B \-l --list
 For each compressed file, list the following fields:
 
@@ -243,7 +238,7 @@ displayed:
 
     method: compression method
     crc: the 32-bit CRC of the uncompressed data
-    date & time: time stamp for the uncompressed file
+    date & time: timestamp for the uncompressed file
 
 The compression methods currently supported are deflate, compress, lzh
 (SCO compress -H) and pack.  The crc is given as ffffffff for a file
@@ -262,20 +257,20 @@ Display the
 license and quit.
 .TP
 .B \-n --no-name
-When compressing, do not save the original file name and time stamp by
+When compressing, do not save the original file name and timestamp by
 default. (The original name is always saved if the name had to be
 truncated.) When decompressing, do not restore the original file name
 if present (remove only the
 .I gzip
 suffix from the compressed file name) and do not restore the original
-time stamp if present (copy it from the compressed file). This option
+timestamp if present (copy it from the compressed file). This option
 is the default when decompressing.
 .TP
 .B \-N --name
-When compressing, always save the original file name and time stamp; this
+When compressing, always save the original file name and timestamp; this
 is the default. When decompressing, restore the original file name and
-time stamp if present. This option is useful on systems which have
-a limit on file name length or when the time stamp has been lost after
+timestamp if present. This option is useful on systems which have
+a limit on file name length or when the timestamp has been lost after
 a file transfer.
 .TP
 .B \-q --quiet
@@ -290,26 +285,20 @@ will descend into the directory and compress all the files it finds there
 .I gunzip
 ).
 .TP
-.B --rsyncable
-While compressing, synchronize the output occasionally based on the input.
-This increases size by less than 1 percent most cases, but means that the
-.BR rsync (1)
-program can much more efficiently syncronize files compressed with this flag.
-.I gunzip
-cannot tell the difference between a compressed file created with this option,
-and one created without it.
-.TP
 .B \-S .suf   --suffix .suf
-Use suffix .suf instead of .gz. Any suffix can be given, but suffixes
+When compressing, use suffix .suf instead of .gz.
+Any non-empty suffix can be given, but suffixes
 other than .z and .gz should be avoided to avoid confusion when files
-are transferred to other systems.  A null suffix forces gunzip to  try
-decompression on all given files regardless of suffix, as in:
-
-    gunzip -S "" *       (*.* for MSDOS)
+are transferred to other systems.
 
-Previous versions of gzip used
-the .z suffix. This was changed to avoid a conflict with
-.IR pack "(1)".
+When decompressing, add .suf to the beginning of the list of
+suffixes to try, when deriving an output file name from an input file name.
+.TP
+.B --synchronous
+Use synchronous output.  With this option,
+.I gzip
+is less likely to lose data during a system crash, but it can be
+considerably slower.
 .TP
 .B \-t --test
 Test. Check the compressed file integrity.
@@ -337,6 +326,11 @@ indicates the slowest compression method (best compression).
 The default compression level is
 .BR \-6
 (that is, biased towards high compression at expense of speed).
+.TP
+.B \-\-rsyncable
+When you synchronize a compressed file between two computers, this option allows rsync to transfer only files that were changed in the archive instead of the entire archive.
+Normally, after a change is made to any file in the archive, the compression algorithm can generate a new version of the archive that does not match the previous version of the archive. In this case, rsync transfers the entire new version of the archive to the remote computer.
+With this option, rsync can transfer only the changed files as well as a small amount of metadata that is required to update the archive structure in the area that was changed.
 .SH "ADVANCED USAGE"
 Multiple compressed files can be concatenated. In this case,
 .I gunzip
@@ -379,39 +373,54 @@ such as tar or zip. GNU tar supports the -z option to invoke gzip
 transparently. gzip is designed as a complement to tar, not as a
 replacement.
 .SH "ENVIRONMENT"
-The environment variable
+The obsolescent environment variable
 .B GZIP
 can hold a set of default options for
-.I gzip.
-These options are interpreted first and can be overwritten by
-explicit command line parameters. For example:
-      for sh:    GZIP="-8v --name"; export GZIP
-      for csh:   setenv GZIP "-8v --name"
-      for MSDOS: set GZIP=-8v --name
+.IR gzip .
+These options are interpreted first and can be overwritten by explicit
+command line parameters.  As this can cause problems when using
+scripts, this feature is supported only for options that are
+reasonably likely to not cause too much harm, and
+.I gzip
+warns if it is used.
+This feature will be removed in a future release of
+.IR gzip .
+.PP
+You can use an alias or script instead.  For example, if
+.I gzip
+is in the directory
+.B /usr/bin
+you can prepend
+.B $HOME/bin
+to your
+.B PATH
+and create an executable script
+.B $HOME/bin/gzip
+containing the following:
 
-On Vax/VMS, the name of the environment variable is GZIP_OPT, to
-avoid a conflict with the symbol set for invocation of the program.
+      #! /bin/sh
+      export PATH=/usr/bin
+      exec gzip \-9 "$@"
 .SH "SEE ALSO"
-znew(1), zcmp(1), zmore(1), zforce(1), gzexe(1), zip(1), unzip(1), compress(1),
-pack(1), compact(1)
+znew(1), zcmp(1), zmore(1), zforce(1), gzexe(1), zip(1), unzip(1), compress(1)
 .PP
 The
 .I gzip
 file format is specified in P. Deutsch, \s-1GZIP\s0 file format
 specification version 4.3,
-.BR <ftp://ftp.isi.edu/in-notes/rfc1952.txt> ,
+.BR <https://www.ietf.org/rfc/rfc1952.txt> ,
 Internet RFC 1952 (May 1996).
 The
 .I zip
 deflation format is specified in P. Deutsch, \s-1DEFLATE\s0 Compressed
 Data Format Specification version 1.3,
-.BR <ftp://ftp.isi.edu/in-notes/rfc1951.txt> ,
+.BR <https://www.ietf.org/rfc/rfc1951.txt> ,
 Internet RFC 1951 (May 1996).
 .SH "DIAGNOSTICS"
 Exit status is normally 0;
 if an error occurs, exit status is 1. If a warning occurs, exit status is 2.
 .TP
-Usage: gzip [-cdfhlLnNrtvV19] [-S suffix] [file ...]
+Usage: gzip [-cdfhklLnNrtvV19] [-S suffix] [file ...]
 Invalid options were specified on the command line.
 .TP
 \fIfile\fP\^: not in gzip format
@@ -434,7 +443,7 @@ than the decompress code on this machine.
 Recompress the file with gzip, which compresses better and uses
 less memory.
 .TP
-\fIfile\fP\^: already has .gz suffix -- no change
+\fIfile\fP\^: already has .gz suffix -- unchanged
 The file is assumed to be already compressed.
 Rename the file and try again.
 .TP
@@ -470,19 +479,10 @@ read and the whole block is passed to
 for decompression,
 .I gunzip
 detects that there is extra trailing garbage after the compressed data
-and emits a warning by default. You have to use the --quiet option to
-suppress the warning. This option can be set in the
-.B GZIP
-environment variable as in:
-  for sh:  GZIP="-q"  tar -xfz --block-compress /dev/rst0
-  for csh: (setenv GZIP -q; tar -xfz --block-compr /dev/rst0
-
-In the above example, gzip is invoked implicitly by the -z option of
-GNU tar. Make sure that the same block size (-b option of tar) is used
-for reading and writing compressed data on tapes.  (This example
-assumes you are using the GNU version of tar.)
+and emits a warning by default.  You can use the --quiet option to
+suppress the warning.
 .SH BUGS
-The gzip format represents the the input size modulo 2^32, so the
+The gzip format represents the input size modulo 2^32, so the
 --list option reports incorrect uncompressed sizes and compression
 ratios for uncompressed files 4 GB and larger.  To work around this
 problem, you can use the following command to discover a large
@@ -497,9 +497,10 @@ In some rare cases, the --best option gives worse compression than
 the default compression level (-6). On some highly redundant files,
 .I compress
 compresses better than
-.I gzip.
+.IR gzip .
 .SH "COPYRIGHT NOTICE"
-Copyright \(co 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
+Copyright \(co 1998-1999, 2001-2002, 2012, 2015-2018 Free Software Foundation,
+Inc.
 .br
 Copyright \(co 1992, 1993 Jean-loup Gailly
 .PP