#!/bin/sh usage () { cat <&2 Usage: ${0##*/} SOURCE... DEST Use rsync to copy SOURCE to DEST while showing progress and allowing resuming. SOURCE can be multiple files or folder. A trailing slash in a source folder will copy the content of it, not the folder itself. If DEST does not exist, it will be created. If DEST has files not present in SOURCE, they will remain untouched. EOF } [ $# -lt 2 ] && usage && exit 1 [ "$1" = "-h" ] && usage && exit [ "$1" = "--" ] && shift rsync -livr --append-verify --progress -- "$@"