From owner-freebsd-questions@FreeBSD.ORG Fri Jul 23 20:43:54 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 963E41065674 for ; Fri, 23 Jul 2010 20:43:54 +0000 (UTC) (envelope-from glarkin@FreeBSD.org) Received: from mail1.sourcehosting.net (113901-app1.sourcehosting.net [72.32.213.11]) by mx1.freebsd.org (Postfix) with ESMTP id 7440D8FC08 for ; Fri, 23 Jul 2010 20:43:54 +0000 (UTC) Received: from 68-189-245-235.dhcp.oxfr.ma.charter.com ([68.189.245.235] helo=cube.entropy.prv) by mail1.sourcehosting.net with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1OcP5w-000D9L-8H; Fri, 23 Jul 2010 16:43:53 -0400 Received: from [127.0.0.1] (fireball.entropy.prv [192.168.1.12]) by cube.entropy.prv (Postfix) with ESMTP id 8980D42D8449; Fri, 23 Jul 2010 16:43:48 -0400 (EDT) Message-ID: <4C49FEFB.2060207@FreeBSD.org> Date: Fri, 23 Jul 2010 16:43:39 -0400 From: Greg Larkin Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Neil Smith References: <178EAA50-D7FE-4355-91EC-3C1018465568@tamu.edu> In-Reply-To: <178EAA50-D7FE-4355-91EC-3C1018465568@tamu.edu> X-Enigmail-Version: 0.96.0 OpenPGP: id=1C940290 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.1 (/) Cc: freebsd-questions@freebsd.org Subject: Re: monitor util in a scripted daemon? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: glarkin@FreeBSD.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jul 2010 20:43:54 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Neil Smith wrote: > - Is there a command (native, shell, or ports collection) to sit and watch for new file creation in a directory? > - I'd like to build a system startup script for such a command and its scripted actions. Sound possible? > - Is there already something in the default OS that does something similar? > > > Thanks, > -Neil > --- > Neil Smith neils@tamu.edu > Comp. Sys. Mngr., Atmospheric Sciences Hi Neil, I haven't used it yet, but gamin should do the trick: http://www.freshports.org/devel/gamin/ I don't see why you couldn't wrap it with a startup script so a list of monitored files/directories could be added to /etc/rc.conf. Hope that helps, Greg - -- Greg Larkin http://www.FreeBSD.org/ - The Power To Serve http://www.sourcehosting.net/ - Ready. Set. Code. http://twitter.com/sourcehosting/ - Follow me, follow you -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFMSf770sRouByUApARAkOAAJwIGJt4trCutsSGCugzGjB93yZx8ACgjdOe o1tEuLiA8wanazn9MlsS3DE= =n83K -----END PGP SIGNATURE-----