Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Jun 2002 12:02:41 -0700 (PDT)
From:      Steve Follmer <sffollmer@yahoo.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   i386/39584: ln -f fails to unlink
Message-ID:  <200206201902.g5KJ2fZt065993@www.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         39584
>Category:       i386
>Synopsis:       ln -f fails to unlink
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 20 12:10:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Steve Follmer
>Release:        4.5-RELEASE
>Organization:
>Environment:
FreeBSD edge1.stevefollmer.com 4.5-RELEASE FreeBSD 4.5-RELEASE #0: Mon Mar 25 18:09:02 PST 2002     root@edge1.stevefollmer.com:/usr/src/sys/compile/EDGE1  i386
>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
      
>Fix:
      
>Release-Note:
>Audit-Trail:
>Unformatted:

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?200206201902.g5KJ2fZt065993>