Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Aug 2001 16:17:01 +0100
From:      David Malone <dwmalone@maths.tcd.ie>
To:        Thorsten Trampisch <thorsten@trampisch.com>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: removing a symbolic link in 4.4-PRERELEASE
Message-ID:  <20010810161701.A5902@walton.maths.tcd.ie>
In-Reply-To: <3B73BC3B.CE1192A8@trampisch.com>; from thorsten@trampisch.com on Fri, Aug 10, 2001 at 12:49:31PM %2B0200
References:  <3B73BC3B.CE1192A8@trampisch.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Aug 10, 2001 at 12:49:31PM +0200, Thorsten Trampisch wrote:
> after upgrading to 4.4-PRERELEASE via CVSup removing a symbolic link to
> a directory
> does not remove the link but the contents of the linked directory.
> 
> Is this behavior a bug or why does it not work like I expected it to?

Did you leave a trailing slash after the name of the directory?
The traditional thing to do is remove the directory if you add the
slash but remove the link if don't include the slash. (I don't have
a 4.4 box I can test this on, but the example below is from a 4.2
box).

	David.

lanczos 29% mkdir a
lanczos 30% ln -s a b
lanczos 31% ln -s a c
lanczos 32% ls -ld ?
drwxr-xr-x  2 dwmalone  wheel  512 Aug 10 16:10 a
lrwxr-xr-x  1 dwmalone  wheel    1 Aug 10 16:11 b -> a
lrwxr-xr-x  1 dwmalone  wheel    1 Aug 10 16:11 c -> a
lanczos 33% rm b
lanczos 34% ls -ld ?
drwxr-xr-x  2 dwmalone  wheel  512 Aug 10 16:10 a
lrwxr-xr-x  1 dwmalone  wheel    1 Aug 10 16:11 c -> a
lanczos 35% rm c/
rm: c/: is a directory


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010810161701.A5902>