🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
6 messages
6 total messages Started by Paul Mon, 28 Oct 1996 00:00
Cleaning news spool...
#11950
Author: Paul
Date: Mon, 28 Oct 1996 00:00
16 lines
989 bytes
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?

TIA,
Paul

Re: Cleaning news spool...
#11939
Author: Chrisy Luke
Date: Mon, 28 Oct 1996 00:00
15 lines
1127 bytes
In article <5532ml$ca@simba.cnsnet.com>, Paul  <paul@cnsnet.com> wrote:
>                                                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.

Hmm, most odd. I'd use +ctime (creation time) in case a lot of files
got 'touch'ed for some reason.

Chris.

Re: Cleaning news spool...
#11941
Author: nils mccarthy
Date: Mon, 28 Oct 1996 00:00
17 lines
1165 bytes
Chrisy Luke <chrisy@easynet.net> wrote:
> Hmm, most odd. I'd use +ctime (creation time) in case a lot of files
> got 'touch'ed for some reason.

The "c" in ctime stands for inode Change time, not for Creation
time.  It is the last time an inode change has been made, other
than just modification time update (utimes, chmod, etc update the
ctime).  For a full description, see the st_ctime section of the
stat(2) man page.

Touch(1) tends to be implemented using utimes(2), so touch would
update the ctime as well as the mtime.

-nils

Re: Cleaning news spool...
#11978
Author: Dave Barr
Date: Tue, 29 Oct 1996 00:00
16 lines
1156 bytes
In article <5532ml$ca@simba.cnsnet.com>, 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.

Do you mean files with modification dates older than 2 days
or articles older than 2 days?

--Dave

Re: Cleaning news spool...
#12006
Author: Tim Hogard
Date: Wed, 30 Oct 1996 00:00
31 lines
1600 bytes
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

Re: Cleaning news spool...
#12009
Author: Daryl E. Kottek
Date: Thu, 31 Oct 1996 00:00
47 lines
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
-- 

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads