Rsync is a utility for efficiently transferring and synchronizing files between computers, external hard drives and networked computers. Rsync is a single threaded application written in C.

In Linux to sync directory /from/target with content of directory /to/source use the following command::

rsync --compress --verbose --human-readable /from/source/ /to/target
rsync -zvhr /from/source/ /to/target

--compress, -z: compress file data during the transfer
--verbose, -v: increase verbosity
--human-readable, -h: output numbers in a human-readable format
--recursive, -r: include subdirectories

In order to compare the content of two directories use::

rsync -avunc /from/source/ /to/target

v -> verbose (list files)
u -> ignore files that are newer in target than on source
n -> do not change anything (dry run)
c -> use checksums

rsync logo