[Novalug] Cron & find

Nick Danger nick@hackermonkey.com
Sun Dec 24 13:10:56 EST 2006


Im running a find in a cron job. Simply this:

*/10 * * * * cd /var/speedtest/upload/ && find -amin +10 -exec rm -f {} \;

Find the files not touched in 10 mins and delete them. The weird thing
is that every few cycles I get an error. This error

rm: cannot remove `.' or `..'


Why is find finding the .. and the .? It never does via command line,
and I would think I have the correct settings in cron so it shouldn't
either... I could change this to include a -type parameter, but I was
hoping for some insight from here first.

-Nick




More information about the Novalug mailing list