From owner-freebsd-questions Thu Sep 12 11:46: 5 2002 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 F0C0A37B400 for ; Thu, 12 Sep 2002 11:46:02 -0700 (PDT) Received: from otter.mills-atl.com (dsl-64-192-140-77.telocity.com [64.192.140.77]) by mx1.FreeBSD.org (Postfix) with ESMTP id C6D8043E42 for ; Thu, 12 Sep 2002 11:46:01 -0700 (PDT) (envelope-from jmmills@telocity.com) Received: from localhost (jmills@localhost) by otter.mills-atl.com (8.9.3/8.9.3) with ESMTP id OAA04694; Thu, 12 Sep 2002 14:52:33 -0400 X-Authentication-Warning: otter.mills-atl.com: jmills owned process doing -bs Date: Thu, 12 Sep 2002 14:52:33 -0400 (EDT) From: John Mills X-Sender: jmills@otter.mills-atl.com Reply-To: John Mills To: "Riley J. McIntire" Cc: John Mills , Beech Rintoul , FreeBSD Questions Subject: RE: Can't delete a directory In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Riley - On Thu, 12 Sep 2002, Riley J. McIntire wrote: > > # consider interactive use here: 'rm -i $FILENAME' > > echo "Removing "$FILENAME > > rm -f $FILENAME > > done > > echo "Removing directories below "$1 > > rm -rf $1 > > fi > Seems to me running rm -rf in a script wouldn't do any more than cli. At that point the script has emptied the directories of files, but not directories. The script doesn't remove directories from the bottom upwards, so you're probably right that it wouldn't work. Can you manually go to a leaf directory, empty it, then backup one and remove it? Can you turn off the exportation, then try the simple 'rm -rf'? How about 'umount' this partition (slice?), re'mount' it on a generic mount-point, then removing what you need to? Afterward you would presumably reverse the process and export the new branch. DISCLAIMER: I'm only guessing here. - John Mills To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message