[expert] Kinda strange find behavour

2002-11-15 Thread David Guntner
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 And every morning, I have an E-Mail waiting for me saying: find:

Re: [expert] Kinda strange find behavour

2002-11-15 Thread Albert E. Whale
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:

Re: [expert] Kinda strange find behavour

2002-11-15 Thread David Guntner
Albert E. Whale grabbed a keyboard and wrote: 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