Article View: news.software.readers
Article #127706Re: slrn: my_posts
From: Tim Hammerquist
Date: Fri, 04 Jul 2003 19:51
Date: Fri, 04 Jul 2003 19:51
34 lines
2145 bytes
2145 bytes
Jimchip graced us by uttering:
> Mike Vanecek wrote:
> > The user account file my_posts contains a copy of all posted
> > messages. Does anyone have a macro (similar to cleanscore)
> > that periodically removes old messages? Otherwise, the file
> > will grow without limit?
>
> I do mine manually. I cp My_Posts MyPosts[date of backup], rm
> My_Posts, touch My_Posts.
>
> Not very elegant but it has been useful for me to archive my
> old posts.
The following short script does the same, which the added
advantage that all permissions for the original file are
preserved (though the new file will not necessarily retain those
of the original).
$ cat bin/arch_file.sh
#!/bin/sh
name="$1"
cp "$name" "$name-`date '+%G%m%d'`"
echo -n > "$name"
$ arch_file.sh My_Posts
$ ls -l
total 14
-rw------- 1 user users 0 2003-07-04 12:41 My_Posts
-rw------- 1 user users 2350 2003-07-04 12:38 My_Posts-20030704
HTH,
Tim Hammerquist
--
"You! Invaders! Get you the hot bullets of shotgun to die!"
-- caption from Battle Rangers video game
Technical Details
Message-ID:
<slrnbgbmkc.42f.tim@vegeta.ath.cx>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!news5.aus1.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border3.nntp.aus1.giganews.com!small1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.stueberl.de!nntp-relay.ihug.net!ihug.co.nz!uunet!hkg.uu.net!lax.uu.net!sac.uu.net!ash.uu.net!news.greatbasin.netReferences:
<tahgt-c95.ln1@news.invalid.99computer> <vgb6ub8je3mr25@news.supernews.com>Show Full Headers
Complete Article Headers
Message-ID: <slrnbgbmkc.42f.tim@vegeta.ath.cx> Subject: Re: slrn: my_posts Date: Fri, 04 Jul 2003 19:51:15 +0000 From: Tim Hammerquist <tim@vegeta.ath.cx> References: <tahgt-c95.ln1@news.invalid.99computer> <vgb6ub8je3mr25@news.supernews.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!news5.aus1.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border3.nntp.aus1.giganews.com!small1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.stueberl.de!nntp-relay.ihug.net!ihug.co.nz!uunet!hkg.uu.net!lax.uu.net!sac.uu.net!ash.uu.net!news.greatbasin.net Newsgroups: news.software.readers Mail-Followup-To: tim@vegeta.ath.cx Mail-Copies-To: nobody X-Editor: Vim-602 http://www.vim.org/ User-Agent: slrn/0.9.7.4 (Linux) NNTP-Posting-Host: rno-dsl0b-222.gbis.net X-Trace: news.greatbasin.net 1057348275 rno-dsl0b-222.gbis.net (4 Jul 2003 Lines: 34