bug-gzip
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Krzysztof Żelechowski
Subject: 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









reply via email to

[Prev in Thread] Current Thread [Next in Thread]