15
votes
4answers
13k views

How to automatically run a script when the contents of a directory changes in Linux?

I want to automatically run a script whenever new files are copied into a particular directory. In other words, is there a way in Linux to "watch" a directory for changes and then run something in ...