Skip to content

Instantly share code, notes, and snippets.

@mondalaci
Created April 11, 2013 14:54
Show Gist options
  • Save mondalaci/5364051 to your computer and use it in GitHub Desktop.
Save mondalaci/5364051 to your computer and use it in GitHub Desktop.
Automatically overwrite destination file with source file whenever the destination file gets overwritten by an external process. This script was written by Zachary Hobbs.
while true; do
inotifywait -q -q -e modify -e delete $2
cp $1 $2
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment