Skip to content

Instantly share code, notes, and snippets.

@evilchili
Created November 5, 2010 16:57
Show Gist options
  • Save evilchili/664443 to your computer and use it in GitHub Desktop.
Save evilchili/664443 to your computer and use it in GitHub Desktop.
watch a directory structure for changes and sync changes to another location every 30 seconds.
% while true; do i="`du |tail -1|cut -f1` `find . |cksum`" && [[ $i != $j ]] && rsync -aq --delete . ~/tmp/; j="$i"; sleep 30; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment