Skip to content

Instantly share code, notes, and snippets.

@wilbeibi
Forked from JohannesBuchner/rsync_on_change.sh
Created January 31, 2018 21:56
Show Gist options
  • Save wilbeibi/80ce5c96f4d1837d0a427b510e49c8a9 to your computer and use it in GitHub Desktop.
Save wilbeibi/80ce5c96f4d1837d0a427b510e49c8a9 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
@wilbeibi
Copy link
Author

wilbeibi commented Feb 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment