[Top][All Lists]

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

Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182)

From: Kamil Dudka
Subject: Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182)
Date: Wed, 7 Jan 2009 20:05:59 +0100
User-agent: KMail/1.9.6 (enterprise 0.20071012.724442)

On Wednesday 07 January 2009 17:08:04 Jim Meyering wrote:
> --no-clobber gets a few more matches in C sources than --no-overwrite,
>   57  http://www.google.com/codesearch?q=\-\-no\-clobber+lang:c
>   40  http://www.google.com/codesearch?q=\-\-no\-overwrite+lang:c
> Regarding uses, it appears to outnumber --no-overwrite 2-to-1.
> Anyone else have a preference?
Now the option is --no-clobber in attached patch. Anyway the change is 
trivial. No problem to change it if there will be a consensus 
for --no-overwrite or something else.

> My point is that depending on when you test for
> the existence of the destination file, you could say that with
> --backup, there is never an existing destination file, since
> it's always moved aside before the "open".  In *that* case,
> you would expect the "-n" in "--backup -n" to be ignored.
> This ambiguity is why the semantics of "--backup -n" must be
> documented explicitly.
Ok, mentioned in documentation of option -n.

> Since there are three copies of that new sentence in coreutils.texi,
>     If you specify more than one of the @option{-i}, @option{-f},
>     @option{-n} options, only the final one takes effect.
> would you please put it in a macro?
Ok, new patch attached.


Attachment: 0001-cp-mv-add-no-clobber-n-option-to-not-overwrite.patch
Description: Text Data

reply via email to

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