Date: Thu, 20 Jun 2002 13:50:03 -0700 (PDT) From: "Crist J. Clark" <crist.clark@attbi.com> To: freebsd-bugs@FreeBSD.org Subject: Re: i386/39584: ln -f fails to unlink Message-ID: <200206202050.g5KKo3p68739@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR i386/39584; it has been noted by GNATS.
From: "Crist J. Clark" <crist.clark@attbi.com>
To: Steve Follmer <sffollmer@yahoo.com>
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: i386/39584: ln -f fails to unlink
Date: Thu, 20 Jun 2002 13:43:25 -0700
On Thu, Jun 20, 2002 at 12:02:41PM -0700, Steve Follmer wrote:
[snip]
> >Description:
> ln -f is supposed to force the unlink of the target directory.
> It fails to do so and also reports no error.
>
> man ln claims...
> -f If the target file already exists, then unlink it so that the link may occur.
>
> >How-To-Repeat:
> edge1# mkdir d1
> edge1# mkdir d2
> edge1# ln -s l1 d1
> edge1# ls -l
> total 4
> drwxr-xr-x 2 root wheel 512 Jun 20 11:13 d1
> drwxr-xr-x 2 root wheel 512 Jun 20 11:12 d2
> edge1# ln -s d1 l1
> edge1# ls -l
> total 4
> drwxr-xr-x 2 root wheel 512 Jun 20 11:13 d1
> drwxr-xr-x 2 root wheel 512 Jun 20 11:12 d2
> lrwxr-xr-x 1 root wheel 2 Jun 20 11:13 l1 -> d1
> edge1# ln -fs d2 l1
> edge1# ls -l
> total 4
> drwxr-xr-x 2 root wheel 512 Jun 20 11:13 d1
> drwxr-xr-x 2 root wheel 512 Jun 20 11:12 d2
> lrwxr-xr-x 1 root wheel 2 Jun 20 11:13 l1 -> d1
You missed it.
# ls -l d1
total 0
lrwxr-xr-x 1 root wheel 2 Jun 20 11:13 l2 -> d2
lrwxr-xr-x 1 root wheel 2 Jun 20 11:13 l1 -> l1
When you run the last 'ln -fs d2 l1,' you are making a symbolic link
to "d2" _inside_ l1. l1 is a symlink to d1, which is where the link
was successfully made.
--
Crist J. Clark | cjclark@alum.mit.edu
| cjclark@jhu.edu
http://people.freebsd.org/~cjc/ | cjc@freebsd.org
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206202050.g5KKo3p68739>
