Você provavelmente deve usar inotify
, ferramentas de linha de comando fornecidas em inotify-tools
package.
Também melhor deve ser o pacote inoticoming
. Descrição:
Description: trigger actions when files hit an incoming directory
inoticoming is a daemon to watch a directory with Linux's inotify
framework and trigger actions once files with specific names are placed
in there.
.
For example it can be used to wait for .changes files uploaded
into a directory and call reprepro to put them into your repository.