25 May
2010
25 May
'10
11:25 p.m.
On 25/05/2010 21:10, Timo Sirainen wrote:
On Tue, 2010-05-25 at 21:29 +0200, Florian Effenberger wrote:
Hello,
I am looking for a command-line utility to automatically purge one Maildir folder.
How about just:
rm -f /path/to/Maildir/.spam-learn/*
Surely we need to delete everything in 'new' and 'cur'? :
rm -f /path/to/Maildir/.spam-learn/new/* /path/to/Maildir/.spam-learn/cur/*
Or perhaps, a bit more pipey and less risk of blowing up whilst globbing in the shell:
maildir=/path/to/Maildir/.spam-learn find $maildir/new $maildir/cur -mindepth 1 -maxdepth 1 -type f -print0 | xargs -0 -r rm -f
Regards,
Bill