From owner-freebsd-questions@freebsd.org Mon Jul 20 09:10:15 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 608059A64D8 for ; Mon, 20 Jul 2015 09:10:15 +0000 (UTC) (envelope-from bennett@sdf.org) Received: from sdf.lonestar.org (mx.sdf.org [192.94.73.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx.sdf.org", Issuer "SDF.ORG" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2C2C41D13 for ; Mon, 20 Jul 2015 09:10:14 +0000 (UTC) (envelope-from bennett@sdf.org) Received: from sdf.org (IDENT:bennett@otaku.freeshell.org [192.94.73.9]) by sdf.lonestar.org (8.14.8/8.14.5) with ESMTP id t6K9A9JQ028022 (using TLSv1/SSLv3 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits) verified NO) for ; Mon, 20 Jul 2015 09:10:09 GMT Received: (from bennett@localhost) by sdf.org (8.14.8/8.12.8/Submit) id t6K9A9J6007857 for freebsd-questions@freebsd.org; Mon, 20 Jul 2015 04:10:09 -0500 (CDT) From: Scott Bennett Message-Id: <201507200910.t6K9A9J6007857@sdf.org> Date: Mon, 20 Jul 2015 04:10:09 -0500 To: freebsd-questions@freebsd.org Subject: limiting find(1) in /etc/periodic scripts User-Agent: Heirloom mailx 12.5 6/20/10 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jul 2015 09:10:15 -0000 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 sdf.org *xor* bennett at freeshell.org * *--------------------------------------------------------------------* * "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 * **********************************************************************