Created
January 19, 2012 17:12
-
-
Save joshholt/1641247 to your computer and use it in GitHub Desktop.
Bash Function to sync directories
This file contains 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
#------------------------------------------------ | |
# $1 should be the local dir you want to sync | |
# $2 should be the remote server path (i.e. user@remote:~/) | |
#------------------------------------------------ | |
function rsync_dir () { | |
rsync --verbose --progress --stats --compress --rsh=/usr/bin/ssh --recursive --times --perms --links --delete --exclude "*bak" --exclude "*~" $1 $2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment