Thanks for the report.
That is the intended behavior -- it is required by POSIX, too, and
consistent with other parts of that standard. If zsh is your shell,
you can tell it to suppress such trailing slashes. If you use some
other shell, ask the maintainer to add a similar feature. I've already
requested it for bash.
In the mean time, you may want to get one of the more recent test releases
ftp://alpha.gnu.org/gnu/fetish/fileutils-4.0t.tar.gz
and use mv's --strip-trailing-slashes option
to suppress that surprising (imho) behavior.
Thomas <[EMAIL PROTECTED]> writes:
| When I move a symbolic link (softlink) which points to a dir with
| "mv X11/ X11-old"
|
| It starts to copy the whole dir X11 points to and tries to delete the
| contents of the origional dir afterwards. (not even the symlink ;-)
|
|
| so:
| ls -al
| lrwxrwxrwx 1 zander users 35 May 31 16:52 X11 ->
|/usr/i486-glibc20-linux/include/X11/
| mv X11/ x
| 'generates lots of "Permission denied" messages'
| ls -al
| lrwxrwxrwx 1 zander users 35 May 31 16:52 X11 ->
|/usr/i486-glibc20-linux/include/X11/
| drwxr-xr-x 11 zander users 4096 May 31 14:19 x/
|
| My opinion is that a directory should never be copied at all (using mv). Simply
| because of user rights etc. People should actively use cp and rm for
| 'renames' across devices.
|
| So my bug report is:
| Why does a copy/delete occur if a symbolic link is renamed
|
| And on top of that:
| It is my opinion that the move command should never start copying a dir
| if a simple rename doesn't work. More intelligent error logging would
| be a lot better.
|
| using: Suse 6.3 and mv (GNU fileutils) 4.0 rpm: fileutil-4.0-21