From owner-freebsd-questions Thu Oct 23 03:20:48 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id DAA17070 for questions-outgoing; Thu, 23 Oct 1997 03:20:48 -0700 (PDT) (envelope-from owner-freebsd-questions) Received: from elvis.vnet.net (elvis.vnet.net [166.82.1.5]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id DAA17065 for ; Thu, 23 Oct 1997 03:20:45 -0700 (PDT) (envelope-from rivers@dignus.com) Received: from ponds.dignus.com (ponds.vnet.net [166.82.177.48]) by elvis.vnet.net (8.8.5/8.8.4) with ESMTP id GAA21200; Thu, 23 Oct 1997 06:20:42 -0400 (EDT) Received: from lakes.dignus.com (lakes [10.0.0.3]) by ponds.dignus.com (8.8.5/8.8.5) with ESMTP id GAA11986; Thu, 23 Oct 1997 06:36:25 -0400 (EDT) Received: (from rivers@localhost) by lakes.dignus.com (8.8.5/8.6.9) id GAA07280; Thu, 23 Oct 1997 06:26:27 -0400 (EDT) Date: Thu, 23 Oct 1997 06:26:27 -0400 (EDT) From: Thomas David Rivers Message-Id: <199710231026.GAA07280@lakes.dignus.com> To: questions@FreeBSD.ORG, shawn@luke.cpl.net Subject: Re: deleted huge directory 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.) > > > > Ha! Been-there, Done-that! You can try this: echo * [which won't do a sort or stat, but might hang because the shell runs out of memory.] Or, echo 1* echo 2* echo 3* echo 4* etc... The, if that doesn't work: echo 11* echo 12* echo 13* echo 14* ... echo 21* echo 22* - once you've narrowed this down; you can replace the 'echo' lines that work with 'rm' lines. Then... (phew) you can peck away at it until it's size becomes manageable. - Dave Rivers -