Mick T wrote:
I have around 5000 mailboxes on local SCSI drives, but yeah I nice -20
the script, and run early in the morning. It doesn't take too long to run
Cool, thanks. (sorry about the Mike T instead of Mick T in the other response, oops) I found that I get a nice speed boost by using a bit more bash-fu with find's target, since my mailboxes are NFS I want tailor to what I know we have. Since all mailboxes are /home/X/XXXX/ (e.g. /home/t/tengel/) I am going with:
find /home/*/*/ -regex '.*/Maildir/\.Junk/\(cur\|new\)/.*' -type f -ctime +14 -exec rm -f '{}' \;
I ran a quick test using some ls -l action instead of rm to get a speed test idea:
# time find /home/*/*/ -regex '.*/Maildir/\.Junk/\(cur\|new\)/.*' -type f -ctime +7 -exec ls -l '{}' \; > results.log
real 23m15.837s user 0m54.882s sys 1m22.567s
That'll do! Not the fastest, but it works. :) -te
-- Troy Engel | Systems Engineer Fluid, Inc | http://www.fluid.com