Article View: news.software.nntp
Article #12009Re: Cleaning news spool...
From: Daryl E. Kottek
Date: Thu, 31 Oct 1996 00:00
Date: Thu, 31 Oct 1996 00:00
47 lines
2206 bytes
2206 bytes
In a previous article, thogard@not.abnormal.com (Tim Hogard) says:
.Paul (paul@cnsnet.com) wrote:
.: In trying to cleanup a messed up news spool, I am trying to
.: delete anything that is older than say 4 days. To do this I
.: am using find . -type f -mtime +4 -print | xargs rm. However
.: that does not seem to celan things out. So I even tried setting
.: the -mtime to +2 to see if it was cleaning the items up and I
.: found out that when it was all finished, I still had articles
.: in the group older than 2 days.
..
.: Am I missing somehting here with the line I am using to find and
.: delete files?
..
.Find is a bit strange on how it works.
.What you need to do is use it's newer option which uses another file's
.date as a time stamp.
..
.touch /tmp/timestamp
.touch 1030235996 /tmp/timestamp # this is a sysV type touch
. # otherwise find alog file from
. # a few days before
.#and then use find's newer with a not
.find /usr/spoo/news !-newer /tmp/timestamp
..
.Then pass that off to fastrm or use -exec rm {} \;
.once you are sure that is what you want.
..
.-tim
.http://www.abnormal.com
..
I have used something similar to what Tim has said, first creating a file
with a particular date stamp (using touch), and then doing a find as he
stated, but I add to look for files that start with a digit.
find /usr/spool/news -type f -name "[0-9]*" ! -newer /tmp/timestamp -exec rm {}\;
If anyone knows of any bad side effects of doing this, I'd sure like to
know.
-Daryl Kottek
--
Technical Details
Message-ID:
<55am7k$75c@ednet2.orednet.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<5575ia$hv8@not.abnormal.com> <5532ml$ca@simba.cnsnet.com>Show Full Headers
Complete Article Headers
Message-ID: <55am7k$75c@ednet2.orednet.org> Subject: Re: Cleaning news spool... Date: Thu, 31 Oct 1996 00:00:00 +0000 From: dkotte2@orednet.org (Daryl E. Kottek) References: <5575ia$hv8@not.abnormal.com> <5532ml$ca@simba.cnsnet.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 193446164 Distribution: inet Organization: Oregon ED-NET, Oregon (USA) Reply-to: dkotte2@orednet.org (Daryl E. Kottek) Newsgroups: news.software.nntp