On Thu, October 16, 2008 3:02 pm, Tony Sceats wrote:
something like
ORIG_DATE=`date -d 7 days ago +%s`
no guarantees, particularly because I have not tested it, but the idea is
Tony,
much obliged,
I've ended up with 49 files from original 50,000 files, seems pretty good,
even without
On Thu, October 16, 2008 11:01 pm, Voytek Eymont wrote:
I've ended up with 49 files from original 50,000 files, seems pretty
not only I've managed to replace last 7 days email, I think I might even
know why there were 50k emails in the 1st place:
there was a 'popfetch' in squirell pointing to
On Fri, Oct 17, 2008 at 7:49 AM, Voytek Eymont [EMAIL PROTECTED] wrote:
On Thu, October 16, 2008 11:01 pm, Voytek Eymont wrote:
I've ended up with 49 files from original 50,000 files, seems pretty
not only I've managed to replace last 7 days email, I think I might even
know why there were
Have you tried csplit(1) - set pattern to '^From ' and stand back. You'll have
to deal with an empty file before the first item.
You say they're sequential so no further processing is required to separate old
ones. Note that many spams have crazy Date values.
Jim Donovan
I have a mailbox
On Thu, October 16, 2008 1:39 pm, Jim Donovan wrote:
Have you tried csplit(1) - set pattern to '^From ' and stand back. You'll
have to deal with an empty file before the first item.
You say they're sequential so no further processing is required to
separate old ones. Note that many spams
something like
ORIG_DATE=`date -d 7 days ago +%s`
for mail in `find /path/to/mail/dir -type f`
do
DATE_STRING=`grep -m1 ^Date $mail | cut -d: -f 2-`
MAIL_DATE=`date -d $DATE_STRING +%s`
if [ $MAIL_DATE -gt $ORIG_DATE ]
then
mv $mail /some/path
fi
done
no