From owner-freebsd-questions Wed Feb 26 12:26: 7 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D560437B401 for ; Wed, 26 Feb 2003 12:26:05 -0800 (PST) Received: from sccrmhc01.attbi.com (sccrmhc01.attbi.com [204.127.202.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id 25F3343F93 for ; Wed, 26 Feb 2003 12:26:05 -0800 (PST) (envelope-from ukla@attbi.com) Received: from [192.168.1.100] (c-66-229-208-206.we.client2.attbi.com[66.229.208.206]) by sccrmhc01.attbi.com (sccrmhc01) with SMTP id <2003022620260400100a6c3ve>; Wed, 26 Feb 2003 20:26:04 +0000 User-Agent: Microsoft-Entourage/9.0.2509 Date: Wed, 26 Feb 2003 12:26:05 -0800 Subject: Deleting a soft link that points to a directory - how? From: Steve Warwick To: Message-ID: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hey All, I cannot seem to delete a soft link (ln -s) that is pointing to a directory without renaming the directory first. If I try to delete the link it complains that the link is a directory (which it is pointing to). If I delete using rm -rf, it deletes the directory that is pointed to but not the link -- I have been burned by that one! FreeBSD 4.3 Here is a little test: %pwd /tmp %mkdir me %cd /root %ln -s /tmp/me MyTmp %rm -f MyTmp/ rm: MyTmp/: is a directory % %rm -rf MyTmp/ (deletes the directory it points to) %rm -f MyTmp (deletes the link) % Help, suggestions, magic? Thanks Steve To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message