[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 16:39:55 +0100 |
User-agent: |
KMail/1.9.6 (enterprise 0.20071012.724442) |
On Wednesday 07 January 2009 08:35:24 Jim Meyering wrote:
> Have you considered other long-option names?
> I prefer --no-clobber. or maybe --no-overwrite
In this case I prefer --no-overwrite, but feel free to change it.
> -----------------------
> Please adjust the NEWS entry:
>
> - cp/mv new option -n to not overwrite target
> + cp and mv accept a new option, --LONG_OPTION (-n): silently refrain
> + from overwriting any existing destination file
>
> -----------------------------
> You haven't mentioned how this new option interacts with --backup,
> another option that prevents loss of any existing destination file.
>
> Since with --backup, cp and mv arrange to move any destination aside,
> one might expect -n --backup to be equivalent to --backup.
The behavior is the same as for -i option with negative user's response. If
nothing is going to be overwritten, there is nothing to backup. I think this
is an expected behavior and in this way is the --backup option already
documented.
> -------------------
> In mv documentation (--help and texi), please say something like:
>
> If you specify more than one of the -i,-f,-n options, only the
> final one takes effect.
>
> That's easier to understand than
>
> -i overrides preceding -f or -n
> -n overrides preceding -i or -f
> -f overrides preceding -i or -n
Yes, it makes sense. The current description was taken from FreeBSD man pages
for cp/mv.
Attaching new version of the patch.
Kamil
0001-cp-mv-add-no-overwrite-n-option-to-not-overwri.patch
Description: Text Data
- Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182 ), Kamil Dudka, 2009/01/06
- Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182), Pádraig Brady, 2009/01/06
- Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182), Kamil Dudka, 2009/01/06
- Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182), Kamil Dudka, 2009/01/06
- Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182), Jim Meyering, 2009/01/07
- Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182),
Kamil Dudka <=
- Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182), Jim Meyering, 2009/01/07
- Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182), Kamil Dudka, 2009/01/07
- Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182), Jim Meyering, 2009/01/07
- Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182), Eric Blake, 2009/01/07
- Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182), Jim Meyering, 2009/01/08
- Message not available
- Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182), Aaron Peterson, 2009/01/11
- Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182), Kamil Dudka, 2009/01/13
- Message not available
- Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182), Aaron Peterson, 2009/01/14
- Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182), Matthew Woehlke, 2009/01/14
- Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182), Aaron Peterson, 2009/01/14