Created
February 8, 2017 09:33
-
-
Save morgangiraud/44c666698696d74b89f0f8552d0ed0fe to your computer and use it in GitHub Desktop.
.bashrc functions to synchronize the current folder to/from the server using rsync
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
synctoserver() { | |
rsync -Pav -e 'ssh -i mykey.pem' "$PWD" [email protected]:rsync/. | |
} | |
syncfromserver() { | |
rsync -Pav -e 'ssh -i mykey.pem' [email protected]:rsync/${PWD##*/}/. . | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment