"Dr. David Alan Gilbert" <[EMAIL PROTECTED]> wrote: > In the info pages for 'mv' is the following statement: > --------------------------------------------------------------------------- > _Warning_: If you try to move a symlink that points to a directory, > and you specify the symlink with a trailing slash, then `mv' doesn't > move the symlink but instead moves the directory referenced by the > symlink. *Note Trailing slashes::. > --------------------------------------------------------------------------- ... > $ mkdir a b > $ ln -s $PWD/a sym > $ mv sym/ b > mv: cannot move `sym/' to `b/sym': Not a directory > > The 'mv' is straight out of recent cvs. I'm in an ext3 filesystem > on Linux (Ubuntu). > > Am I misunderstanding something about that warning or is this > a bug?
It depends on the semantics of the rename syscall. And those semantics vary from system to system. On older linux systems (probably 2.4.x, certainly 2.2.20, which I've just tested) your mv command renames `a' to b/sym. Losing systems probably deserve a configure-time test and a rename wrapper to correct for the unexpected behavior. _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
