17 lines
346 B
Bash
Executable File
17 lines
346 B
Bash
Executable File
#!/bin/sh
|
|
|
|
usage () {
|
|
cat <<EOF>&2
|
|
Usage: ${0##*/} OLD-DIR NEW-DIR
|
|
|
|
Use rsync to display a folder tree diff between OLD-DIR and NEW-DIR.
|
|
Trailing slash is not necesssary.
|
|
EOF
|
|
}
|
|
|
|
[ $# -lt 2 ] && usage && exit 1
|
|
[ "$1" = "-h" ] && usage && exit
|
|
[ "$1" = "--" ] && shift
|
|
|
|
rsync -nivr --links --perms --group --owner --delete --size-only "$2/" "$1"
|