Skip to content

Instantly share code, notes, and snippets.

@JohannesBuchner
Created December 15, 2015 16:59
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save JohannesBuchner/62fc88277709bb29f9e7 to your computer and use it in GitHub Desktop.
Save JohannesBuchner/62fc88277709bb29f9e7 to your computer and use it in GitHub Desktop.
rsync loop that updates remote directory when local directory changes (using inotify)
while true
do
rsync -avz ./ user@host:remote/directory/
inotifywait -r ./
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment