Article View: news.software.readers
Article #48170Re: Automating Removal of Mailing List Mail With Slrn or Slrnpull
From: fh... Frank Hahn
Date: Fri, 23 Apr 1999 00:00
Date: Fri, 23 Apr 1999 00:00
42 lines
2315 bytes
2315 bytes
On 18 Apr 1999 04:36:12 GMT, John E. Davis <da...@space.mit.edu> wrote:
>On Sun, 18 Apr 1999 03:16:23 GMT, Frank Hahn <fh...@zdnetmail.com>
>wrote:
>>My question is, how do I delete this mail in an automated manor?
>>With slrnpull, you can tell it to delete articles over so many
>>days old.
>
>It is easy to write a script in your favorite language that does
>something similar. It took me a few minutes to write the following
>slang script (use, e.g., the slsh program distributed with slang 1.3.5
>from ftp://space.mit.edu/pub/davis/slang/snapshots to execute this).
>You would use this script like:
>
I appreciate both yours and Tony Summerfelts' responses. This is
what I have come up with so far.
I read through the man page for the "find" command on a Solaris
system and it gave an example of something similiar to what I wanted.
After messing around with it for awhile, I finally got it to delete
the oldest files. I then made it executable.
Here is the script:
------------------------------------------
#!/bin/sh
#
find /var/spool/slrnpull/news/maillist/* \( -name '*' \)
-mtime +5 -exec rm {} \;
------------------------------------------
The above line beginning with "find" is just one line in my script.
I have run it three or four times and it seems to do what I want.
I realize there is probably a much better way to do this, but
this seems to work.
Thanks for the help.
--
Frank Hahn
Technical Details
Message-ID:
<924836418.727.96@news.remarQ.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!not-for-mailReferences:
<924405383.479.38@news.remarQ.com> <slrn7hio99.u7q.davis@aluche.mit.edu>Show Full Headers
Complete Article Headers
Message-ID: <924836418.727.96@news.remarQ.com> Subject: Re: Automating Removal of Mailing List Mail With Slrn or Slrnpull Date: Fri, 23 Apr 1999 00:00:00 +0000 From: fh...@zdnetmail.com (Frank Hahn) References: <924405383.479.38@news.remarQ.com> <slrn7hio99.u7q.davis@aluche.mit.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!not-for-mail X-Deja-AN: 469812801 X-Complaints-To: news...@remarQ.com X-Trace: 924836418.727.96 5B4ZYJX.M28C7D0A4C usenet1.supernews.com Organization: Posted via RemarQ Communities, Inc. User-Agent: slrn/0.9.5.4 (UNIX) Reply-To: fh...@zdnetmail.com NNTP-Posting-Date: Fri, 23 Apr 1999 03:00:18 GMT Newsgroups: news.software.readers,alt.lang.s-lang