PROJET AUTOBLOG


Links

source: Links

⇐ retour index

inotifywait(1) - Linux man page

samedi 13 septembre 2014 à 23:58
# utilisation de inotifywait pour surveiller un dossier
sudo apt-get install inotify-tools

# affiche "plop" au moindre accès au dossier
while inotifywait -rq /dossier_à_surveiller/; do echo "plop"; done

# affiche un message à la moindre création ou modification de fichier ou dossier
while a=`inotifywait -rq -e create,modify --format '%e : %w%f' /dossier_à_surveiller/`; do echo "$a"; done
(Permalink)