On 7/20/05, Keith Fahlgren <keith / oreilly.com> wrote:
> Hey,
> 
> I'd like to have a daemon process that watches for new files in a
> specific directory and then runs a command on them once they're there.
> It seems like a problem someone would have solved before but I haven't
> been able to dig up anything about it on the web yet (perhaps I'm not
> phrasing it correctly). Just thought I'd bounce a question here before
> I started coding it myself.
> 
> Any thoughts?
> 
> 
> thanks,
> Keith

Take a look at "Daedalus", its part of the FreeBSD Sysutils
(http://www.freebsd.org/es/ports/sysutils.html).  For some help in how
to configure, use it, see
http://manuals.textdrive.com/read/chapter/61#page147.

Basically, it runs in the background and will execute any system
commands you want (which in your case might be another Ruby script
which can detect if a file has been added to the dir).  It will
respond by executing another script of your choosing.

Matt