root crontab bug?

James J Dempsey jjd at alexander.bbn.com
Sun Dec 9 09:07:00 AEST 1990


It seems to me that there is a bug in the default root crontab that Sun
distributes with each machine such that it ends up causing a lot of
unnecessary NFS traffic each night.

Each of my SunOS 4.0.3 and SunOS 4.1 systems came with a line in root's
crontab which looks like this:

15 3 * * * find / -name .nfs\* -mtime +7 -exec rm -f {} \; -o -fstype nfs -prune

It seems as if the intent of the "-fstype nfs -prune" is to stop the find
from continuing onto remote systems.  However, if you try it you will see
that that clause only works if it comes before the rest of the find
statement.  If you change it to look like this it will work as intended:

15 3 * * * find / -fstype nfs -prune -o -name .nfs\* -mtime +7 -exec rm -f {} \;

I discovered the problem when there were problems with a subdirectory on a
remote host each of my suns sent me mail saying that they couldn't "find"
in that directory.

                --Jim Dempsey--
		jjd at bbn.com



More information about the Comp.sys.sun mailing list