linux - watch a directory for new files, then run a script
问题 I want to watch a directory in Ubuntu 14.04, and when a new file is created in this directory, run a script. specifically I have security cameras that upload via FTP captured video when they detect motion. I want to run a script on this FTP server so when new files are created, they get mirrored (uploaded) to a cloud storage service immediately, which is done via a script I've already written. I found iWatch which lets me do this (http://iwatch.sourceforge.net/index.html) - the problem I am