2 Feb
2007
2 Feb
'07
9:26 p.m.
Sean Kamath wrote:
find /home/?/????/.*/Maildir/.Junk -regex '\(cur\|new\)/.*' -type f -ctime +14 -print | xargs rm -f
Close! I actually reworked it and have a good working solution, and it turns out xargs is much faster than -exec. The final line I have is:
find /home/*/*/Maildir/.Junk/ -regex '.*/\(cur\|new\)/.*' -type f -ctime +14 -print0 | xargs -0 rm -f
...which brought me down to about 1m 12sec or so, but I'm sure there's a lot of caching here. Regardless it's still a very nice increase!
thanks, -te
-- Troy Engel | Systems Engineer Fluid, Inc | http://www.fluid.com