I have an application that needs to process large files after they are uploaded to the system. In Linux, is it possible to detect folder changes and have a script run automatically, or should I just run a cron job every minute to look for new files?
feedback
|
|
Checkout inotify. If your running a recent kernel it will be included. There are numerous APIs for numerous languages out there for it. | |||||
feedback
|
|
Ionotify, as David says, is what you're looking for. Iowatch is a little Perl script that uses Ionotify, via Perl, to report changes to a filesystem. Assuming you've got a degree of Perl scripting experience you should be able to hack this into something that does what you want. | |||
|
feedback
|
|
You need a File Alteration Monitor. Take a look on http://oss.sgi.com/projects/fam/ | |||
|
feedback
|
|
If you need a simple frontend to FAMs, fileschanged can be useful, at least for prototyping. | |||
|
feedback
|