From owner-freebsd-questions Mon Mar 8 12:20:31 1999 Delivered-To: freebsd-questions@freebsd.org Received: from cc942873-a.ewndsr1.nj.home.com (cc942873-a.ewndsr1.nj.home.com [24.2.89.207]) by hub.freebsd.org (Postfix) with ESMTP id 5E23314F5E for ; Mon, 8 Mar 1999 12:20:28 -0800 (PST) (envelope-from cjc@cc942873-a.ewndsr1.nj.home.com) Received: (from cjc@localhost) by cc942873-a.ewndsr1.nj.home.com (8.9.3/8.8.8) id PAA23450; Mon, 8 Mar 1999 15:28:27 -0500 (EST) (envelope-from cjc) From: "Crist J. Clark" Message-Id: <199903082028.PAA23450@cc942873-a.ewndsr1.nj.home.com> Subject: Re: /var -- Device Busy In-Reply-To: <19990308190831.7072.qmail@alpha.comkey.com.au> from Greg Black at "Mar 9, 99 05:08:30 am" To: gjb@comkey.com.au (Greg Black) Date: Mon, 8 Mar 1999 15:28:27 -0500 (EST) Cc: chris@tci.com, mikegoe@ibm.net, freebsd-questions@FreeBSD.ORG Reply-To: cjclark@home.com X-Mailer: ELM [version 2.4ME+ PL40 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Greg Black wrote, > > > Hmmm...I've always used rm -r to remove > > > directories...didn't even realize there was a rmdir > > > command...I guess there's many ways to do the same thing... > > > :) > > > > Are you sure you weren't using rm -rf? > > Do the following and answer your own question: > > mkdir testdir > touch testdir/file > rm -r testdir > > Of course, if you are not root and if some elements in the tree > are read-only, then you'll get asked about them without the -f > flag -- but the -f flag will not allow you to rm anything that > you could not rm without using -f (which means that -f has no > meaning when used by root). Not true. The '-f' flag will prevent error messages about files that do not exist as well as cause 'rm' to exit on a 0 in such a situation. This can be important in scripts and makefiles. And to the makefile writers who think the '-f' option on 'mv' does the same thing, it does _not._ -- Crist J. Clark cjclark@home.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message