Created
September 5, 2013 05:43
-
-
Save theorm/6446450 to your computer and use it in GitHub Desktop.
Rsync two external hard drives.
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/bash | |
SRC='/Volumes/apple-a' | |
DST='/Volumes/apple-b' | |
[ -d $SRC ] || { | |
echo "$SRC is not mounted"; | |
exit 1; | |
} | |
[ -d $DST ] || { | |
echo "$DST is not mounted"; | |
exit 1; | |
} | |
rsync -a --progress --stats --del "$SRC/" "$DST" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment