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: Paul Eggert
Subject: bug#50097: gzip: add "--keep" option to keep original files unchanged
Date: Fri, 20 Aug 2021 08:15:43 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

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*.


My normal usage of (hard) links is as follows:
Create a file page.txt. Link it to page.html.
Want to view? Open page.html.
Want to edit? Open page.txt.
Want to attach? gzip -k page.html … oops.

Oh my. That is ... unusual. Let's see if others chime in about whether this usage would justify changing the behavior of gzip -k.





reply via email to

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