Is this a Race Condition?

Martin McCormick martin at dc.cis.okstate.edu
Fri Jan 23 09:13:14 PST 2004


	I have a cron job that looks for files in /tmp and other
directories that are more than X days old so that they go away and
don't keep piling up.  Every few days, I get a message like:

------- Forwarded Message


Date:    Fri, 23 Jan 2004 10:51:00 CST

From:    root at sistem.domain(Cron Daemon)
Subject: Cron <root at system> find /var/tmp -name NOTESTS -mtime +1 -exec rm -f {} \;


find: /var/tmp/okstate.zone.32220: No such file or directory

	My guess is that find expands the tree but the temporary file
is gone by the time the find command actually executes the rm command.

	The messages are purely random as to the file name and
directory.

	Thanks.

Martin McCormick WB5AGZ  Stillwater, OK 
OSU Information Technology Division Network Operations Group


More information about the freebsd-questions mailing list