From owner-freebsd-questions Thu Jul 13 15:34: 4 2000 Delivered-To: freebsd-questions@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id B461B37B5F6 for ; Thu, 13 Jul 2000 15:34:00 -0700 (PDT) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id e6DMXuN06529; Thu, 13 Jul 2000 15:33:56 -0700 (PDT) Date: Thu, 13 Jul 2000 15:33:56 -0700 From: Alfred Perlstein To: "Eric J. Schwertfeger" Cc: questions@FreeBSD.ORG Subject: Re: any faster way to rm -rf huge directory? Message-ID: <20000713153356.Y25571@fw.wintelcom.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: ; from ejs@bfd.com on Thu, Jul 13, 2000 at 02:08:10PM -0700 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Eric J. Schwertfeger [000713 14:50] wrote: > > Thanks to a programmer-induced glitch in a data-pushing perl script, we > are the proud owners of a directory with (currently) a quarter million > files in it. The directory is on a vinum partition striped across three > seagate baracudas, with soft-updates being used. > > I did "rm -rf " to clean up the directory, and that was > Monday. At the current rate of deletions (just under 10/minute), it's > going to be a week or two before it gets done, as it should get faster > once the directory gets smaller. > > I understand at a technical level why it is going so slow, so I'm not > complaining (I'm the one that insists that any directory with over 10,000 > files be split up). My question is, short of backing up the rest of the > disk, newfs, and restore (not an option, this is the main partition of a > live server), is there a faster way to do this? Not a critical issue, as > we have plenty of room, and despite the fact that all the drive lights are > flickering madly nonstop, the system's performance isn't off too much, > so it's more a matter of curiosity. Once snapshots are stable, careful use of fsdb, then taking a snapshot and fsck would work to take care of the dangling files. Right now I can't think of anything else. -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message