Monitor Directory for Changes

Nate picture Nate · Feb 4, 2009 · Viewed 41.9k times · Source

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?

Answer

Douglas Leeder picture Douglas Leeder · Feb 4, 2009

Look at inotify.

With inotify you can watch a directory for file creation.