Managing Maildirs

Bill Campbell freebsd at celestial.com
Sun Dec 21 12:58:24 PST 2003


On Sun, Dec 21, 2003, Ollie Cook wrote:
>On Fri, Dec 19, 2003 at 11:00:55AM -0800, Bill Campbell wrote:
>> Number one above will do the trick and is far more efficient than using the
>> ``find ...-exec'', although you might want to modify it to only nuke mail
>> over a certain age.  To nuke all trash over 30 days old:
>> 
>> 	find /home/*/Maildir/.Trash -type f -mtime +30 | xargs rm
>
>Using '-delete' rather than 'find ... | xargs rm' should be more efficient
>still:
>
>    find /home/*/Maildir/.Trash -type f -mtime +30 -delete

Hmmm.  That would be nice, but it seems to be BSD-centric.  I don't see the
``-delete'' option in any version of find I have around, certainly not in
the find from gnu:
	gfind . -name xxxxyyyyzzz -delete
	gfind: invalid predicate `-delete'

I find using options like this leads to portability problems.

Bill
--
INTERNET:   bill at Celestial.COM  Bill Campbell; Celestial Software LLC
UUCP:               camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``Are we at last brought to such a humiliating and debasing degradation,
that we cannot be trusted with arms for our own defense? Where is the
difference between having our arms in our own possession and under our own
direction, and having them under the management of Congress? If our defense
be the real object of having those arms, in whose hands can they be trusted
with more propriety, or equal safety to us, as in our own hands?''
    -- Patrick Henry June 9, 1788, in the Virginia Convention on the
    ratification of the Constitution.


More information about the freebsd-isp mailing list