bug-coreutils
[Top][All Lists]
Advanced

[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: Eric Blake
Subject: Re: cp/mv: add -n option to not overwrite target (Ubuntu bug #229182)
Date: Mon, 22 Dec 2008 05:49:24 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.18) Gecko/20081105 Thunderbird/2.0.0.18 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Pádraig Brady on 12/22/2008 2:54 AM:
>> +  -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.

POSIX requires support for simultaneous -f and -i, in either order, so we
can't error out there.  But since -n is an addition, we can error out
depending on -f or -i, if that makes more sense than overriding.

Again, since we are modeling after the fact that FreeBSD provides it, what
is the behavior on that platform when you mix-n-match -fin?

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAklPjNQACgkQ84KuGfSFAYBw6ACgolgN28dHEi7tT7EmqSBBGZvh
jCgAoJ68rQbAMM2QIFTEDL0jgIYKRWCj
=WhOf
-----END PGP SIGNATURE-----




reply via email to

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