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 17:18:49 +0200

Dnia piątek, 20 sierpnia 2021 17:15:43 CEST Paul Eggert pisze:
> On 8/20/21 7:52 AM, Krzysztof Żelechowski wrote:
> >> echo hello >a
> >> ln a b
> >> gzip -k b && gzip -cd b.gz >>b
> >> 
> >> This would trash 'a' if gzip -k succeeded. (Same with 'ln -s'.)
> > 
> > The appending redirection operator has nothing to do with gzip.
> 
> That's true even without -k: if plain 'gzip b' succeeded in this case,
> any problem that the user ran into later would have nothing to do with
> gzip. Plain 'gzip b' ignores 'b' here, not because compressing 'b' would
> cause any problem with gzip itself, but because it could cause confusion
> *later*.

If plain { gzip b; } succeeded, we have a problem because [a] is compressed 
but not renamed.

Chris










reply via email to

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