inotifywait – a very handy utility

A simple way to watch a directory and take action. Could have issues with race conditions so to be used only in simpler set-ups but a great lightweight alternative to running rsync on a cron schedule.

Documentation at

My own script on Tiny Core Linux (/home/scripts/, which runs the backup utility upon posting of an entry in my blog.

/usr/local/bin/inotifywait -r -m -e close_write /home/apache2/pivotx/pivotx/db/s

sudo -b


Called from as

su tc “-c /home/scripts/>/home/pivtox.log”