GNU bug report logs - #62572
cp --no-clobber behavior has changed

Previous Next

Package: coreutils;

Reported by: Alberto Salvia Novella <es20490446e <at> gmail.com>

Date: Fri, 31 Mar 2023 17:49:01 UTC

Severity: normal

Full log


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

From: Alberto Salvia Novella <es20490446e <at> gmail.com>
To: Pádraig Brady <P <at> draigbrady.com>
Cc: Paul Eggert <eggert <at> cs.ucla.edu>, Sven Joachim <svenjoac <at> gmx.de>,
 62572 <at> debbugs.gnu.org
Subject: Re: bug#62572: cp --no-clobber behavior has changed
Date: Sat, 1 Apr 2023 20:14:07 +0200
[Message part 1 (text/plain, inline)]
Maybe simpler:

-m --missing
Only copy non existing files.

On Sat, 1 Apr 2023 at 17:44, Pádraig Brady <P <at> draigbrady.com> wrote:

> On 01/04/2023 00:29, Paul Eggert wrote:
> > On 2023-03-31 14:32, Pádraig Brady wrote:
> >
> >> Perhaps we should support:
> >>     --no-clobber[={skip, fail (default)}]
> >>
> >> so then users can at least easily change -n to --no-clobber=skip
> >> to get the old behavior?
> >>
> >> An alternative would be to augment the --update option to support:
> >>     --update[={none, older (default)}]
> >> where --update=none would be the equivalent of the old -n behavior.
> >
> > The latter sounds a bit better but I suppose either would work. We could
> > generalize it a bit further, e.g.:
> >
> >     --skip-diagnose[={yes,no}]
> >        Whether to diagnose a copying action being skipped.
> >     --skip-fail[={yes,no}]
> >        Whether exit status should be 1 when skipping a copying action.
> >
> > Presumably similar options would apply to ln and mv.
> >
> > All these extra options might be overkill, though.
> >
> >
> >> Perhaps we should also diagnose files skipped in the -n fail case,
> >> to make it easier for users to see what the issue is.
> >
> > FreeBSD cp -n doesn't diagnose, and GNU cp -n has never diagnosed, so
> > it's probably better to leave sleeping dogs lie.
>
> OK first stab at --update=none support is attached.
>
> cheers,
> Pádraig
>
[Message part 2 (text/html, inline)]

This bug report was last modified 1 year and 176 days ago.

Previous Next


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