From owner-freebsd-questions Thu May 21 19:25:36 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA04269 for freebsd-questions-outgoing; Thu, 21 May 1998 19:25:36 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from freebie.lemis.com (freebie.lemis.com [139.130.136.133]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA04252 for ; Thu, 21 May 1998 19:25:24 -0700 (PDT) (envelope-from grog@lemis.com) Received: (from grog@localhost) by freebie.lemis.com (8.8.8/8.8.7) id LAA01335; Fri, 22 May 1998 11:55:05 +0930 (CST) (envelope-from grog) Message-ID: <19980522115505.A27201@freebie.lemis.com> Date: Fri, 22 May 1998 11:55:05 +0930 From: Greg Lehey To: Malartre , Frank Griffith Cc: freebsd-questions@FreeBSD.ORG Subject: Re: How do I erase an entire directory References: <002a01bd8505$15bd4c60$0200a8c0@fast1.dfw.com> <3564DD58.9E0B90C0@aei.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: <3564DD58.9E0B90C0@aei.ca>; from Malartre on Thu, May 21, 1998 at 10:05:12PM -0400 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 21 May 1998 at 22:05:12 -0400, Malartre wrote: > Frank Griffith wrote: > >> I am still getting use to installing ports and make some >> mistakes when I do. Each time I install and things aren't >> quite right, I erase everything and reinstall the port. My >> problem is I can't seem to figure out how to erase an >> entire directory. If it has files in it, I can't just type rmdir >> without doing each directory, starting at the bottom of the >> tree. Can someone tell me if there is a command similar >> to deltree in DOS for FreeBSD. >> >> Note: deltree will allow you to delete an entire directory and >> all its subfolders with one swift command line. > > Try > rm -R dir > > # pwd > /home/kaput/pub/FreeBSD/FreeBSD-current/ > # cd > # pwd > /home/kaput/ > # rm -R pub > rm -R is correct for FreeBSD and Solaris 2, but other versions of UNIX don't understand it. All versions understand rm -r, however, which does the same thing, so it's preferable to use that option. Greg -- See complete headers for address and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message