From owner-freebsd-questions Wed Oct 22 23:44:53 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id XAA03358 for questions-outgoing; Wed, 22 Oct 1997 23:44:53 -0700 (PDT) (envelope-from owner-freebsd-questions) Received: from adelphi.physics.adelaide.edu.au (adelphi.physics.adelaide.edu.au [129.127.36.247]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id XAA03348 for ; Wed, 22 Oct 1997 23:44:35 -0700 (PDT) (envelope-from kkennawa@physics.adelaide.edu.au) Received: from bragg by adelphi.physics.adelaide.edu.au (5.65/AndrewR-930902) id AA30257; Thu, 23 Oct 1997 16:14:32 +0930 From: Kristian Kennaway Received: by bragg; (5.65/1.1.8.2/05Aug95-0227PM) id AA12343; Thu, 23 Oct 1997 16:14:31 +0930 Message-Id: <9710230644.AA12343@bragg> Subject: Re: deleted huge directory To: shawn@luke.cpl.net (Shawn Ramsey) Date: Thu, 23 Oct 1997 16:14:31 +0930 (CST) Cc: questions@FreeBSD.ORG In-Reply-To: from "Shawn Ramsey" at Oct 22, 97 09:38:52 pm X-Mailer: ELM [version 2.4 PL23] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > Does anyone have any suggestions for deleting a huge directory? The > direcory is /var/news/spool/control/cancel. The directory is too large to > even do a ls. If I try doing ls, it eats up all the avail. RAM(140+mb) and > hangs. Anyone? I would try a wildcard, but I don't know what the filenames > are. (This is a very large news server, and this directory has never been > touch as far as I know.) How about a good old rm -rf /var/news/spool/control followed by a mkdir /var/news/spool/control/cancel to recreate the directory? You might also be able to get a list of files with doing an "echo *" in the directory - thats a little trick I picked up somewhere which hasnt actually proved useful until now :-) Kris