inotify-tools is a set of UNIX utilities to work with Linux's inotify framework. Some of my interesting recipes:
1 # Print full path; pipe to sh that calls rsync 2 inotifywait -mrq --format '%w%f' --exclude '.*\.swp.*' -e close_write -e delete -e create directory-to-watch \ 3 while read file; do 4 echo "rs ${file} caligula:remote/" 5 done
1 # Print parent directory only 2 inotifywait -mrq --format '%w' --exclude '.*\.swp.*' -e close_write -e delete -e create directory-to-watch