Eric Blake <[EMAIL PROTECTED]> wrote:
> According to Paul Eggert on 11/28/2005 10:57 AM:
>>>mv a b/
>>>
>>>mv: target `b/' is not a directory: No such file or directory
>>
>> As I understand it, POSIX says that "mv a b/" is equivalent to
>> rename("a", "b/"),
>
> Correct.Note that the underlying rename would fail on Linux 2.6.x and *BSD (but it'd succeed on Solaris 9 and 10): $ touch a; rm -rf b; perl -e 'rename "a", "b/" or die "$!"' Not a directory at -e line 1. [Exit 20] Currently, mv detects this particular `problem' without performing an actual rename, so it's more consistent than it would be if it were relying on the actual system call. If you can convince the kernel folks to change the way rename works, or POSIX to dissociate mv behavior from that of rename(2), then you might have a case for changing GNU mv. So, technically, I think GNU mv is doing what is required of it, as long as the underlying rename would also fail. _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
