bug-coreutils
[Top][All Lists]
Advanced

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

Re: cp -i: "sucker Holmes" questions


From: Eric Blake
Subject: Re: cp -i: "sucker Holmes" questions
Date: Sun, 12 Nov 2006 12:57:17 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.8) Gecko/20061025 Thunderbird/1.5.0.8 Mnenhy/0.7.4.666

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

According to Dan Jacobson on 11/12/2006 9:19 AM:
> Seen on Debian coreutils 5.97-5:

Consider upgrading to stable coreutils 6.4, as the 5.9x series is no
longer actively maintained, and as there were a number of changes made to
cp in the meantime.

>    $ cp -i b a
>    cp: overwrite `a', overriding mode 0644? y
>    cp: cannot create regular file `a': Permission denied
>    $ ls -dl ? .
>    drwxr-xr-x 2 jidanni jidanni 60 2006-11-07 01:30 .
>    -rw-r--r-- 1 root    root     0 2006-11-07 01:29 a
>    -rw-r--r-- 1 jidanni jidanni  0 2006-11-07 01:29 b

Sorry, but POSIX requires this behavior.
http://www.opengroup.org/onlinepubs/009695399/utilities/cp.html

In fact, the NEWS for 6.4 states the following:
  cp -i and mv -i occasionally neglected to prompt when the copy or move
  action was bound to fail.  This bug dates back to before fileutils-4.0.

- --
Life is short - so eat dessert first!

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

iD8DBQFFV3yc84KuGfSFAYARAlVQAJ4zdqoP/bLMfVwq2L9XPeigMdRfigCdGTTe
dEv1SD08KZ7zbse0mIz2im0=
=e7Dq
-----END PGP SIGNATURE-----




reply via email to

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