summaryrefslogtreecommitdiff
path: root/gzip.1
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-02-20 11:07:55 +0100
committerJim Meyering <meyering@redhat.com>2010-02-22 14:42:54 +0100
commit884ef6d16c66835640cf0b3539a53e95cfed059c (patch)
tree7f006dba046175c5937d8f6a51c8b106374d5e62 /gzip.1
parent3eb6091d69a73b5955bc9acf9ca507fc5f52f42c (diff)
downloadgzip-884ef6d16c66835640cf0b3539a53e95cfed059c.tar.gz
gzip: fix a data-loss bug when decompressing with --suffix=''
* gzip.c (main): Disallow an empty --suffix=S also with -d. Otherwise, "gzip -d -S '' F.gz" would ask if it's ok to remove the existing file, "F.gz"; if you reply "yes", you'd lose all of that data. Use of an empty suffix was already rejected in compression mode. * gzip.1 (--suffix (-S)): Do not recommend to use "gunzip -S '' *". Describe how the suffix is used when decompressing, too. * NEWS (Bug fixes): mention the fix. Reported by Ripduman Sohan.
Diffstat (limited to 'gzip.1')
-rw-r--r--gzip.111
1 files changed, 5 insertions, 6 deletions
diff --git a/gzip.1 b/gzip.1
index bdf6943..8db327d 100644
--- a/gzip.1
+++ b/gzip.1
@@ -291,15 +291,14 @@ will descend into the directory and compress all the files it finds there
).
.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:
+are transferred to other systems.
- gunzip -S "" * (*.* for MSDOS)
+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.
-Previous versions of gzip used
-the .z suffix. This was changed to avoid a conflict with
.IR pack "(1)".
.TP
.B \-t --test