On Wed, Dec 05, 2012 at 02:15:06PM -0600, Curt Lundgren wrote:
> I wrote a Perl script a few years ago that deletes files from a directory
> that are older than n number of days.  We generally set n to 30 days, but
> you can set it to be anything you want.

Script can be replaced by a one-liner:

find /path/to/dir -type f -mtime +31 | xargs rm

or

find /path/to/dir -type f -mtime +31 -delete

This will handle maildir directories but not legacy mbox format spools
as requested, however.





                                                        John
-- 
American youth attributes much more importance to arriving at driver's
license age than at voting age.

-- Marshall McLuhan (1911-1980), Canadian philosopher of communication theory,
   Understanding Media (1964)

Attachment: pgp0JUCJGZG9O.pgp
Description: PGP signature

Reply via email to