Description of problem: When gzip compresses a file, the original file is replaced and there is no option to create the .gz file AND keep the original. There are many instances where it is desireable to have BOTH files. A typical example is to take advantage of web servers ability to serve different files based on browser capability. (Apache +MultiViews) A simple -k --keep option to keep the original file would solve the problem very nicely. Version-Release number of selected component (if applicable): gzip 1.3.5 (gzip -V) gzip-1.3.5.-6.2.1 (rpm) How reproducible: Always.. this is an RFE ( Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: I have an automated process to receive files and do the following: find *[^.gz] -print0 | while read -d $'\0' fn; do gzip -c --best "$fn" > "$fn.gz"; touch -r "$fn" "$fn.gz"; done; but that is a lot of code just to (effectively) force gzip to keep the original file. ANd it does not take into account any errors encountered by gzip... find *[^.gz] -print0 | xargs -r0I {fn} gzip -k --best "{fn}" is much simpler to read/maintain/understand. The current -c option has two meanings: 1 - keep original file 2 - write output to stdout Those are two very different things and never should have been tied to the same option flag. However, the behavior of -c should not change.
Thank you for your bug report. I have sent a patch upstream.
Where is "upstream"? I'd like to track this. Thanks.
The upstream homepage is http://www.gzip.org/ Gzip upstream maintainer is jloup.
Me too. The command-line tools for the newer compression formats (bzip2, xz) have this feature. Please just add the patch to the Fedora package.