views:

1041

answers:

2

Much like a similar SO question, I am trying to monitor a directory on a Linux box for the addition of new files and would like to immediately process these new files when they arrive. Any ideas on the best way to implement this?

A: 

One solution I thought of is to create a "file listener" coupled with a cron job. I'm not crazy about this but I think it could work.

Nate
If you want to process them ASAP, there is no way around inotify.
Aaron Digulla
+7  A: 

Look at inotify.

With inotify you can watch a directory for file creation.

Douglas Leeder