[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: |
Pádraig Brady |
Subject: |
Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182) |
Date: |
Mon, 22 Dec 2008 09:54:17 +0000 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20071008) |
Kamil Dudka wrote:
> Hello,
>
> proposed patch is attached.
This patch makes sense, however...
> diff --git a/src/mv.c b/src/mv.c
> index fc255f3..bfdf286 100644
> --- a/src/mv.c
> +++ b/src/mv.c
> @@ -310,8 +311,13 @@ Mandatory arguments to long options are mandatory for
> short options too.\n\
> fputs (_("\
> --backup[=CONTROL] make a backup of each existing destination
> file\n\
> -b like --backup but does not accept an
> argument\n\
> - -f, --force do not prompt before overwriting\n\
> - -i, --interactive prompt before overwrite\n\
> + -f, --force do not prompt before overwriting (The -f
> option\n\
> + overrides any previous -i or -n options.)\n\
> + -i, --interactive prompt before overwrite (The -i option\n\
> + overrides any previous -f or -n options.)\n\
> + -n, --no-replace do not overwrite an existing file (The -n\n\
> + option overrides any previous -f or -i\n\
> + options.)\n\
This is actually now quite confusing/inaccurate. I think these 3 options
should be mutually exclusive. I.E. if more than 1 specified an
error should be printed. Also the descriptions should be changed
to something like:
-f rename a file even if the destination is present and not writable
-i always prompt before overwriting an existing file
-n never overwrite an existing file
The same argument applies to `cp`, but s/rename/overwrite/ in the -f
description.
cheers,
Pádraig.
- Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182),
Pádraig Brady <=
- Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182), Eric Blake, 2008/12/22
- Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182), Pádraig Brady, 2008/12/22
- Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182), Andreas Schwab, 2008/12/22
- Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182), Eric Blake, 2008/12/22
- Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182), Pádraig Brady, 2008/12/22
- Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182), Eric Blake, 2008/12/22
- Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182), Pádraig Brady, 2008/12/22