Date: Sat, 08 Jul 2000 12:08:31 +0200 From: Siegbert Baude <siegbert.baude@gmx.de> To: "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org> Subject: Replacing symbolic link to directory Message-ID: <3966FD9F.E3314796@gmx.de>
next in thread | raw e-mail | index | archive | help
Hi,
I wonder why the following isn't working:
su-2.03# mkdir d1 d2
su-2.03# ln -vs d1 d3
d3 -> d1
su-2.03# ls -l
total 2
drwxr-xr-x 2 root wheel 512 8 Jul 11:56 d1/
drwxr-xr-x 2 root wheel 512 8 Jul 11:56 d2/
lrwxr-xr-x 1 root wheel 2 8 Jul 11:56 d3@ -> d1
su-2.03# ln -fvs d2 d3
d3/d2 -> d2
su-2.03# ls -l
total 2
drwxr-xr-x 2 root wheel 512 8 Jul 11:56 d1/
drwxr-xr-x 2 root wheel 512 8 Jul 11:56 d2/
lrwxr-xr-x 1 root wheel 2 8 Jul 11:56 d3@ -> d1
su-2.03#
So nothing has been changed by "ln -fvs d2 d3". I would have expected it
to behave exactly like:
su-2.03# unlink d3
su-2.03# ll
total 2
drwxr-xr-x 2 root wheel 512 8 Jul 11:56 d1/
drwxr-xr-x 2 root wheel 512 8 Jul 11:56 d2/
su-2.03# ln -vs d2 d3
d3 -> d2
su-2.03# ll
total 2
drwxr-xr-x 2 root wheel 512 8 Jul 11:56 d1/
drwxr-xr-x 2 root wheel 512 8 Jul 11:56 d2/
lrwxr-xr-x 1 root wheel 2 8 Jul 11:57 d3@ -> d2
su-2.03#
Because in the man-page of ln there are the following lines:
The options are as follows:
-f Unlink any already existing file, permitting the link to
occur.
-s Create a symbolic link.
-v Cause ln to be verbose, showing files as they are processed.
What ist the meaning of the output: d3/d2 -> d2 ?
BTW, the same procedure with normal files works just as expected.
Puzzled
Siegbert
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3966FD9F.E3314796>
