Date: Fri, 22 May 1998 14:21:57 +0930 From: Greg Lehey <grog@lemis.com> To: Annelise Anderson <andrsn@andrsn.Stanford.EDU>, Malartre <malartre@aei.ca> Cc: Frank Griffith <frankg@idfw.com>, freebsd-questions@FreeBSD.ORG Subject: Re: How do I erase an entire directory Message-ID: <19980522142157.F27201@freebie.lemis.com> In-Reply-To: <Pine.BSF.3.96.980521212918.7487A-100000@andrsn.stanford.edu>; from Annelise Anderson on Thu, May 21, 1998 at 09:33:03PM -0700 References: <3564E6AC.2AC3614B@aei.ca> <Pine.BSF.3.96.980521212918.7487A-100000@andrsn.stanford.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 21 May 1998 at 21:33:03 -0700, Annelise Anderson wrote: > On Thu, 21 May 1998, Malartre wrote: >> Greg Lehey wrote: >>> 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 >>>> <screenshot> >>>> # pwd >>>> /home/kaput/pub/FreeBSD/FreeBSD-current/ >>>> # cd >>>> # pwd >>>> /home/kaput/ >>>> # rm -R pub >>>> </screenshot> >>> >>> 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. >> >> Well, its an errata in the tutorial for >> newbies:http://www.freebsd.org/tutorials/newuser/newuser.html#ch-7 >> I have Cc to Annelise Anderson :-) > > Thanks--it should be rm -r. I will change it one of these days. > > But rm -R should have worked; if it didn't, it may be because the rm > command is aliased to rm -i, where i means "interactive" and asks you > to confirm each deletion. I expect it would have worked. I was commenting on the style (after I had first written "RTFM: it's not -R, it's -r", and then having RTFMd myself :-) 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980522142157.F27201>