Marco Marongiu <[EMAIL PROTECTED]> writes:
> # You may prefer -mtime instead of -ctime here...
> find $CACHEDIR -type f -ctime +$MAXAGE -exec rm -f {} \;

This will go much quicker as:

  find $CACHEDIR -type f -ctime +$MAXAGE -print0 | xargs -0 rm -f

That will only run one rm process for every few thousand files.  Also,
it uses the "-0" options on both sides for safety.

-Dom

-- 
| Semantico: creators of major online resources          |
|       URL: http://www.semantico.com/                   |
|       Tel: +44 (1273) 722222                           |
|   Address: 33 Bond St., Brighton, Sussex, BN1 1RD, UK. |

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to