limiting find(1) in /etc/periodic scripts

Scott Bennett bennett at
Mon Jul 20 09:10:15 UTC 2015

     What is the best way to keep find(1) in the various /etc/periodic
scripts from descending into certain directories?  The problem I'm trying
to solve is the wasted time and wear and tear on hardware from multiple,
systemwide find(1) commands descending into root's CCACHE_DIR.  I have
the ccache set up for 5 directory levels, and it currently has 827,106
files in it, including grid-only-knows how many directories.  Each find(1)
can run for the better part of an hour, which causes a number of performance
headaches, too.  The only find(1) that I want run against that directory
tree is the one in the security script that checks for SUID files.  The
rest are all wasted effort and maddening.
     I looked, but didn't find any sign of a variable in
/etc/{defaults/,}periodic.conf to exclude directories from find(1)'s
work assignments.  Did I miss them?  Or, if such do not exist, what is
the best alternative method of excluding specific directory trees?
     Thanks for any ideas!

                                  Scott Bennett, Comm. ASMELG, CFIAG
* Internet:   bennett at   *xor*   bennett at  *
* "A well regulated and disciplined militia, is at all times a good  *
* objection to the introduction of that bane of all free governments *
* -- a standing army."                                               *
*    -- Gov. John Hancock, New York Journal, 28 January 1790         *

More information about the freebsd-questions mailing list