From owner-freebsd-stable Fri Aug 10 8:17: 7 2001 Delivered-To: freebsd-stable@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 5BC2437B406 for ; Fri, 10 Aug 2001 08:17:03 -0700 (PDT) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 10 Aug 2001 16:17:02 +0100 (BST) Date: Fri, 10 Aug 2001 16:17:01 +0100 From: David Malone To: Thorsten Trampisch Cc: freebsd-stable@freebsd.org Subject: Re: removing a symbolic link in 4.4-PRERELEASE Message-ID: <20010810161701.A5902@walton.maths.tcd.ie> References: <3B73BC3B.CE1192A8@trampisch.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3B73BC3B.CE1192A8@trampisch.com>; from thorsten@trampisch.com on Fri, Aug 10, 2001 at 12:49:31PM +0200 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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