Created
October 17, 2018 00:34
-
-
Save xydac/e479195f44f6c1cd9d243a44199a53d4 to your computer and use it in GitHub Desktop.
rsync directory on recursive file changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# requires sudo apt-get install inotify-tools | |
cd /sourcepath | |
while inotifywait -r ./*; do | |
rsync -e 'ssh -p 245' --exclude='.git/' -rzuv ./ [email protected]:/destination | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment