Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Jul 2010 16:43:39 -0400
From:      Greg Larkin <glarkin@FreeBSD.org>
To:        Neil Smith <neils@tamu.edu>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: monitor util in a scripted daemon?
Message-ID:  <4C49FEFB.2060207@FreeBSD.org>
In-Reply-To: <178EAA50-D7FE-4355-91EC-3C1018465568@tamu.edu>
References:  <178EAA50-D7FE-4355-91EC-3C1018465568@tamu.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
-----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-----




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C49FEFB.2060207>