GNU bug report logs - #50097
gzip: add "--keep" option to keep original files unchanged

Previous Next

Package: gzip;

Reported by: Krzysztof Żelechowski <giecrilj <at> stegny.2a.pl>

Date: Tue, 17 Aug 2021 17:45:01 UTC

Severity: wishlist

Full log


Message #29 received at 50097 <at> debbugs.gnu.org (full text, mbox):

From: Krzysztof Żelechowski <giecrilj <at> stegny.2a.pl>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Rodrigo Campos <rodrigo <at> sdfg.com.ar>, 50097 <at> debbugs.gnu.org,
 Antonio Diaz Diaz <antonio <at> gnu.org>
Subject: Re: bug#50097: gzip: add "--keep" option to keep original files
 unchanged
Date: Fri, 20 Aug 2021 14:20:36 +0200
Dnia czwartek, 19 sierpnia 2021 23:32:44 CEST Paul Eggert pisze:
> On 8/19/21 1:43 PM, Krzysztof Żelechowski wrote:
> > The command { gzip b; } fails because it would compress [a] without
> > renaming it.
> > The command { gzip -k b; } would not compress [a], so there is no reason
> > to
> > fail.
> 
> There is a safety reason to fail. A naive user might do this:
> 
> gzip -k b && gzip -cd b.gz >b
> 
> which would trash the hard-linked file as well.

That would replace the content of the file b with the content of the file b.  
How bad can that be? ;-)

Chris








This bug report was last modified 3 years and 78 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.