Setup:
mkdir foo
ln -s foo bar
Case 1 (works):
mv bar baz
You get from ls (abbreviated):
lrwxrwxrwx baz -> foo
drwxr-xr-x foo
Case 2 (broken?):
mv bar/ baz
You get from ls (abbreviated):
lrwxrwxrwx bar -> foo
drwxr-xr-x baz
So, when you follow the name of a softlink with a /, mv derefrences the
softlink and moves the result.
I haven't thought this through, but it sure seems counterintuitive. It
also kind of makes bash filecompletion bite, as this always sticks the
slash on the end of a directory.
If you really want to dereference links before moving, an argument seems
appropriate.
(You can also reach me at [EMAIL PROTECTED])
Further info:
Redhat 6.1
glibc rpm glibc-2.1.2-13
fileutils rpm fileutils-4.0-8
mv is ld to (-> are softlinks in /lib):
libc.so.6 -> libc-2.1.2.so
ld-linux.so.2 -> ld-2.1.2.so
Karl
May the Legos (TM) always be swept from your path in the night.