Last active
January 24, 2019 06:28
-
-
Save rlan/3bda8eb6d11ca23828dc188b10941357 to your computer and use it in GitHub Desktop.
rsync ssh example
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
| #!/bin/sh -x | |
| # rsync ssh example | |
| # $1 - source folder | |
| # $2 - machine name | |
| # $3 - target folder | |
| if [ $# -eq 0 ]; then | |
| echo "No arguments supplied" | |
| else | |
| rsync -avzhe ssh $1 $2:$3 | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment