Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Oct 1997 09:39:55 +0100 (BST)
From:      Gordon Henderson <gordon@drogon.net>
To:        Greg Lehey <grog@lemis.com>
Cc:        Shawn Ramsey <shawn@luke.cpl.net>, questions@FreeBSD.ORG
Subject:   Re: deleted huge directory
Message-ID:  <Pine.LNX.3.95.971023092444.14037A-100000@unicorn>
In-Reply-To: <19971023155733.51272@lemis.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 23 Oct 1997, Greg Lehey wrote:

> On Wed, Oct 22, 1997 at 09:38:52PM -0700, Shawn Ramsey wrote:
> > 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.)
> 
> Doesn't rm -rf work?  Otherwise you could try
> 
>   find dir | xargs rm -rf

I do the following to clear this from time to time

  cd /var/news/spool/control
  mv cancel cancel.old

(then a new one gets created and news keeps on going)

  cd cancel.old
  ls -f > /var/tmp/cancel.rm
  xargs rm -f < /var/tmp/cancel.rm

However, if ls hangs for you this this might not work. (Kill news for a
few moments to get all available RAM). The -f flag stops ls from sorting
the outout. This is probably where it's going wrong and taking all the
time amd memory.

The filenames are article numbers. They are stored on your machine so your
machine can them feed them on to your news peers. The reason there are so
many of them is because there are now lots of people actively cancelling
spam, etc. (as well as lots of rogue sites cancelling perfectly good
articles because they don't conform to their own personal or religious
belifs)

Gordon
-- 
This Gordon Henderson                     \   MIME mail? No thanks.
    is gordon@drogon.net                   \   "Learn the words!"
and yes, Drogon *is* an anagram of Gordon!  \    The Patrician; Ankh-Morpork.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.3.95.971023092444.14037A-100000>