Last active
April 19, 2016 16:45
-
-
Save allaryin/f9614cc7e89908a15523fa7e4d09698c to your computer and use it in GitHub Desktop.
Nice directory 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
#!/bin/sh | |
BWLIMIT=1024 | |
if [ ! -d "$1" -o ! -d "$2" ]; then | |
echo "$0 <orig dir> <new dir>" | |
exit 1 | |
fi | |
SRC=`realpath "${1}"`/ | |
DST=`realpath "${2}"` | |
set -x | |
rsync --progress --inplace --human-readable --stats -avz --bwlimit=${BWLIMIT} "${SRC}" "${DST}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment