Created
March 21, 2022 13:37
-
-
Save hongchaodeng/81c8704bb6974e86713a87d966a790d5 to your computer and use it in GitHub Desktop.
rsync code
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
#!/usr/bin/env bash | |
path=$1 | |
# sync dir append '/' at the end, e.g. my-code/ | |
rsync -avzhe ssh --progress \ | |
--exclude ".git" \ | |
$path user@remote:$path |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment