From owner-freebsd-hackers Thu Feb 20 23:02:58 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id XAA10518 for hackers-outgoing; Thu, 20 Feb 1997 23:02:58 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id XAA10501 for ; Thu, 20 Feb 1997 23:02:55 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.3/8.6.9) id RAA31725; Fri, 21 Feb 1997 17:59:07 +1100 Date: Fri, 21 Feb 1997 17:59:07 +1100 From: Bruce Evans Message-Id: <199702210659.RAA31725@godzilla.zeta.org.au> To: hackers@freebsd.com, thompson@tgsoft.com Subject: Re: ln -s -f does unlink of dir Cc: bugs@freebsd.org Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >On my 2.1.6 system i had a directory /usr/src/sys. Elsewhere in the >filesystem i stupidly did a ln -s -f /u/FreeBSD/src/* /usr/src. To my >immense surprise, ln unlinked /usr/src/sys! fsck'ing /usr proved that >this was true. > >I suppose everybody but me knew about that, though? Perhaps not. `ln -sf' is buggy and attempts to unlink /usr/src/sys. This can only succeed as root. 2.1.x permits root to unlink directories although 2.2 and -current don't. Bruce