Find Command Syntax

Matthew Seaman m.seaman at
Wed Sep 22 08:39:09 PDT 2004

On Wed, Sep 22, 2004 at 08:26:07AM -0700, Drew Tomlinson wrote:
> I'm trying to write a script to feed the mail in my spam folder to 
> Spamassassin's sa-learn and then delete the mails older than 1 day in 
> that spam folder.  Here's my current directory listing:

> I'm trying to use the find command to do the deleting but am having 
> trouble with the syntax.  For testing, I'm using this command:
> blacklamb> find /path/to/Maildir/.Spam/cur \! -newerct 1d -print
> blacklamb>
> It finds nothing.  I read in the manual that time specifications don't 
> have much meaning without the '-' or '+' operator so I try adding it:


    find /path/to/Maildir/.Spam/cur -type f -mtime +1 -print

Or you might want to use -ctime instead of -mtime -- I think mtime is
probably a more reliable measure than ctime.



Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP:         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-questions mailing list