From owner-freebsd-questions@FreeBSD.ORG Sat May 12 05:31:38 2007 Return-Path: X-Original-To: freebsd-questions@FreeBSD.org Delivered-To: freebsd-questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3F02316A402 for ; Sat, 12 May 2007 05:31:38 +0000 (UTC) (envelope-from hemi@puresimplicity.net) Received: from just.puresimplicity.net (just.puresimplicity.net [68.77.126.251]) by mx1.freebsd.org (Postfix) with ESMTP id E3BF613C44B for ; Sat, 12 May 2007 05:31:37 +0000 (UTC) (envelope-from hemi@puresimplicity.net) Received: from just.puresimplicity.net (localhost.puresimplicity.net [127.0.0.1]) by just.puresimplicity.net (8.13.8/8.13.6) with ESMTP id l4C55wAL028398 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 12 May 2007 00:05:58 -0500 (CDT) (envelope-from hemi@just.puresimplicity.net) Received: (from hemi@localhost) by just.puresimplicity.net (8.13.8/8.13.6/Submit) id l4C55w41028397 for freebsd-questions@FreeBSD.org; Sat, 12 May 2007 00:05:58 -0500 (CDT) (envelope-from hemi) Date: Sat, 12 May 2007 00:05:58 -0500 From: Josh Tolbert To: freebsd-questions@FreeBSD.org Message-ID: <20070512050558.GA28182@just.puresimplicity.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Greylist: Sender is SPF-compliant, not delayed by milter-greylist-2.0.2 (just.puresimplicity.net [127.0.0.1]); Sat, 12 May 2007 00:05:58 -0500 (CDT) Cc: Subject: Is there any already-existing method for removing empty dirs through periodic? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2007 05:31:38 -0000 Hello, A bit of backstory...I'm running motion (motion.sourceforge.net) on a machine connected to three analog IR cameras through three bktr cards in order to keep an eye on our vehicles. We've had problems with stereos stolen, tires cut, etc. motion is configured to write files out to the apache22 DocumentRoot, which makes it easy to view the videos. I've even got Apache doing neat things with HTMLTable, FancyIndexing, SuppressRules and CSS to make it not look horrible, but that's besides the point. The cameras write out their videos to subdirs like so: year/month/day/camera-#/hh-mm-ss.avi. This setup eats disk space fast. I've been using the clean-tmps daily periodic to remove all files older than seven days from the video location, which takes care of the space issue, but there's one more little issue. It leaves a lot of empty directories. I could just write a cron entry to take care of empty directories, but I'm hoping there's something I'm missing and there's a way to remove empty directories from the locations specified in daily_clean_tmps_dirs. If there's not, would this be a useful feature to add to the clean-temps daily script? Thanks, Josh -- Josh Tolbert hemi@puresimplicity.net || http://www.puresimplicity.net/~hemi/ Security is mostly a superstition. It does not exist in nature, nor do the children of men as a whole experience it. Avoiding danger is no safer in the long run than outright exposure. Life is either a daring adventure, or nothing. -- Helen Keller