Updated at 2013-11-19 00:33

rsync is a program for keeping data in sync between multiple locations. It uses efficient checksum algorithm to compare files and transfers only differences.

rsync from/ to/
# -n does a trial run
# -r transfers directories recursively
# -l transfers symlinks
# -a maintains attributes of the original files
# --exclude=*.wav don't sync .wav files
# --delete remove files from target that don't exist in the source
# --delete-excluded same but also delete excluded
# --partial enable mode that can be resumed if broken
# --progress show syncing progress
rsync -avzh /copy/from user@
rsync -avzhe 'ssh -p 1234' /copy/from user@