Date: Fri, 23 Jul 2010 21:44:37 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Neil Smith <neils@tamu.edu> Cc: freebsd-questions@freebsd.org Subject: Re: monitor util in a scripted daemon? Message-ID: <4C49FF35.3090201@infracaninophile.co.uk> 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
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigDC07663C78D16F760B58D3CF Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 23/07/2010 20:58:06, Neil Smith wrote: > - Is there a command (native, shell, or ports collection) to sit and wa= tch for new file creation in a directory? gamin -- http://people.gnome.org/~veillard/gamin/ > - I'd like to build a system startup script for such a command and its = scripted actions. Sound possible? It's in ports already. Doesn't appear to have a separate rc script -- it's part of gnome, and would get run along with those applications. > - Is there already something in the default OS that does something simi= lar? Look at kevent(2), kqueue(2) -- the EVFILT_VNODE filter can be used to pick up changes to the link count of a directory: ie that a file has been created or destroyed within it. Some C programming required. AFAIK there isn't a ready built application in the base OS to do what you want.= Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matthew@infracaninophile.co.uk Kent, CT11 9PW --------------enigDC07663C78D16F760B58D3CF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxJ/zwACgkQ8Mjk52CukIw0ZACbBRhx1jvQjBuxT5z1JjyVC0Nh cSwAn1lGRv6JHWlkI6y9mVqEkeIiB36T =5hdn -----END PGP SIGNATURE----- --------------enigDC07663C78D16F760B58D3CF--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C49FF35.3090201>