David, Find is actually caching the Directory Information, before it sorts through it all.
Put the Following Option into your script: -maxdepth 1 This will make find examine the directories that you want to delete, and not the underlying filestructure underneath. HTH. David Guntner wrote: > I've got a cron job that runs every night, to get rid of Mozilla cache files. > In it, it does: > > cd /home > for d in `ls` > do > if [ -d $d/.mozilla ]; then > find $d/.mozilla -type d -name Cache -exec rm -rf {} \; > fi > done -- Albert E. Whale - CISSP http://www.abs-comptech.com ---------------------------------------------------------------------- ABS Computer Technology, Inc. - ESM, Computer & Networking Specialists Sr. Security, Network, and Systems Consultant Board of Directors - InfraGard - Pittsburgh, PA
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com