views:

67

answers:

1

I'm having some issues with a cron job to delete emails after 21 days. I've read through many examples and have tried many different variations of this command but I can't get it to work:

find /home/cont/mail///cur -name "*" -mtime +21 -exec rm {} \;

Currently this runs and I get a message back from every mail box that doesn't have any files in the folder: "rm: cannot remove `/home/cont/mail/example.com/admin/cur': Is a directory"

I then check the directories that do have files in them and nothing is deleted. I'm sure I'm missing something simple...

Thanks.

A: 

I'm glad no one answered this and made me look even more stupid. It is working, the messages back are just because there are no emails but I am seeing the emails deleted from other user's folders now.

Jared Detroit