Skip to content

Instantly share code, notes, and snippets.

View gerardjp's full-sized avatar
🥳
Tech = Fun

Gerard gerardjp

🥳
Tech = Fun
View GitHub Profile
@fago
fago / watch.sh
Created March 17, 2014 20:59
Inotify script to trigger a command on file changes, e.g. rsync
#!/bin/bash
# (c) Wolfgang Ziegler // fago
#
# Inotify script to trigger a command on file changes.
#
# The script triggers the command as soon as a file event occurs. Events
# occurring during command execution are aggregated and trigger a single command
# execution only.
#
# Usage example: Trigger rsync for synchronizing file changes.