Skip to content

Instantly share code, notes, and snippets.

@theorm
Created September 5, 2013 05:43
Show Gist options
  • Save theorm/6446450 to your computer and use it in GitHub Desktop.
Save theorm/6446450 to your computer and use it in GitHub Desktop.
Rsync two external hard drives.
#!/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