monitor util in a scripted daemon?
m.seaman at infracaninophile.co.uk
Fri Jul 23 20:44:49 UTC 2010
On 23/07/2010 20:58:06, Neil Smith wrote:
> - Is there a command (native, shell, or ports collection) to sit and watch 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 similar?
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.
Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matthew at infracaninophile.co.uk Kent, CT11 9PW
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 267 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20100723/963109a6/signature.pgp
More information about the freebsd-questions