[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mv trailing slash warning
From: |
Eric Blake |
Subject: |
Re: mv trailing slash warning |
Date: |
Mon, 26 Sep 2005 22:11:14 -0600 |
User-agent: |
Mozilla Thunderbird 1.0.2 (Windows/20050317) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Dr. David Alan Gilbert on 9/26/2005 11:17 AM:
>
>>>$ mkdir a b
>>>$ ln -s $PWD/a sym
>>>$ mv sym/ b
>>>mv: cannot move `sym/' to `b/sym': Not a directory
>
> Nod. Perhaps the warning needs a warning that it can't be relied
> on?
No, POSIX requires rename("sym/", name) to move the directory, not the
symlink, so the warning is accurate and should apply to all systems,
whether or not their rename is conformant. You may also want to check
what `type mv` prints, in case you have an alias in place that strips
trailing slashes.
- --
Life is short - so eat dessert first!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDOMZh84KuGfSFAYARAsNCAJ474YiX73/7s2kWiy0lMycYsDK+rgCeNewk
5XM3GtBn5YbR0iHnMoiR95k=
=/t4l
-----END PGP SIGNATURE-----