rsync -av --progress --inplace --rsh='ssh -p8023' somefile user@host:somedir/ rsync -Pazvh -e ssh user@host:remote_file local_file
-a, --archive archive mode. It is a quick way of saying you want recursion and want to preserve everything --partial keep partially transferred files --progress show progress during transfer -P instead of –partial –progress. -e, --rsh=COMMAND specify rsh replacement -v, --verbose increase verbosity -z, --compress compress file data -r, --recursive recurse into directories -h, Humanly readable --delete Delete files on destination that is not on source --delete-after Same as above, just does the delete after the file copy, not before.
The option a sometimes gives me odd errors. I don't use it anymore.
rsync --update -zPrvh /media/vissie/Vissie_3T/Movies /media/vissie/2T\ PikkeDis/
An Important Note
You may have noticed that there is a trailing slash (/) at the end of the first argument in the above commands:
rsync -a dir1/ dir2
This is necessary to mean "the contents of dir1".
The alternative, without the trailing slash, would place dir1, including the directory, within dir2. This would create a hierarchy that looks like: