From owner-freebsd-questions Thu May 21 21:16:21 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA23528 for freebsd-questions-outgoing; Thu, 21 May 1998 21:16:21 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from fly.HiWAAY.net (root@fly.HiWAAY.net [208.147.154.56]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA23483 for ; Thu, 21 May 1998 21:16:09 -0700 (PDT) (envelope-from dkelly@nospam.hiwaay.net) Received: from nospam.hiwaay.net (tnt3-21.HiWAAY.net [208.147.146.21]) by fly.HiWAAY.net (8.8.8/8.8.6) with ESMTP id XAA28596; Thu, 21 May 1998 23:16:03 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by nospam.hiwaay.net (8.8.8/8.8.4) with ESMTP id TAA07438; Thu, 21 May 1998 19:44:12 -0500 (CDT) Message-Id: <199805220044.TAA07438@nospam.hiwaay.net> X-Mailer: exmh version 2.0.2 2/24/98 To: "Frank Griffith" cc: freebsd-questions@FreeBSD.ORG From: David Kelly Subject: Re: How do I erase an entire directory In-reply-to: Message from "Frank Griffith" of "Thu, 21 May 1998 17:09:08 CDT." <002a01bd8505$15bd4c60$0200a8c0@fast1.dfw.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 21 May 1998 19:44:11 -0500 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "Frank Griffith" writes: > 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. "man rm" The command you probably want is "rm -rf dirname" On the other hand this business of "installing ports and make some mistakes" concerns me. "Ports" as in /usr/ports/*"? Or some source code you are playing with? The proper way to remove a formal port (one that originated from /usr/ports or /usr/packages) after you install it is pkg_delete. Again, consult the man page. One day you'll know you've got the hang of Unix when you realize you know how to delete a file named "-r". You are most the way there when you realize the difficulty in deleting a file named "-r" before you try and get into trouble. -- David Kelly N4HHE, dkelly@nospam.hiwaay.net ===================================================================== The human mind ordinarily operates at only ten percent of its capacity -- the rest is overhead for the operating system. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message