Automate your shell scripts using inotifywait | La Gentz Blog
jeudi 30 janvier 2014 à 16:24Plutôt que de lancer un cronjob pour vérifier l'arrivée de nouveaux fichiers dans un dossier, utilisez inotifywait (paquet inotify-tools) :
inotifywait -m -e create /home/tiger-222/courriels | while read file; do
echo "Woops : nouveau courriel ! [$file]"
done
(Permalink)
inotifywait -m -e create /home/tiger-222/courriels | while read file; do
echo "Woops : nouveau courriel ! [$file]"
done
(Permalink)