On Jul 26, 2009, at 11:58 AM, Daniel L. Miller wrote:
I suppose if I was using a consistent naming scheme for the temp files, or placed them in a subdirectory, I could use an hourly cron job to make sure they were cleaned up. That approach has always bothered me - but I don't know of a better one.

Anyone have any suggestions on alternate implementations I might pursue?

Sure, you can use find to expire the old files.

find $HOME/Maildir/.SPAM/{cur,new} -type f -ctime +7 -delete

That deletes all the spam over a week old in my spam folder.

I run that once a day out of a crontab:

11 4 * * * find $HOME/Maildir/.SPAM/{cur,new} -type f -ctime +7 -delete

(run at 0411 everyday)

--
Man is born free, but is everywhere in chains.

Reply via email to