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 #23 received at 50097 <at> debbugs.gnu.org (full text, mbox):

From: Krzysztof Żelechowski <giecrilj <at> stegny.2a.pl>
To: Antonio Diaz Diaz <antonio <at> gnu.org>, Rodrigo Campos <rodrigo <at> sdfg.com.ar>
Cc: 50097 <at> debbugs.gnu.org
Subject: Re: bug#50097: gzip: add "--keep" option to keep original files
 unchanged
Date: Thu, 19 Aug 2021 22:43:54 +0200
Dnia czwartek, 19 sierpnia 2021 17:28:51 CEST Rodrigo Campos pisze:
> On 8/19/21 3:50 PM, Antonio Diaz Diaz wrote:
> > Rodrigo Campos wrote:
> > $ touch a && ln a b && ls -go *
> > -rw-r--r-- 2 0 Aug 19 15:29 a
> > -rw-r--r-- 2 0 Aug 19 15:29 b
> > $ gzip -k b
> > gzip: b has 1 other link  -- unchanged
> 
> Yeap, but the same happens if you run this instead: gzip b (i.e. without
> -k).
> 
> It is not the -k flag that gets in the way. This is what happens in
> gzip, even without using the flag.
> 
> Am I missing something?

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.
HTH,
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.