a fast, versatile, remote (and local) file-copying tool
This tells rsync to copy directories recursively. See also --dirs (-d).
Beginning with rsync 3.0.0, the recursive algorithm used is now an incremental scan that uses much
less memory than before and begins the transfer after the scanning of the first few directories
have been completed. This incremental scan only affects our recursion algorithm, and does not
change a non-recursive transfer. It is also only possible when both ends of the transfer are at
least version 3.0.0.
Some options require rsync to know the full file list, so these options disable the incremental
recursion mode. These include: --delete-before, --delete-after, --prune-empty-dirs, and
--delay-updates. Because of this, the default delete mode when you specify --delete is now
--delete-during when both ends of the connection are at least 3.0.0 (use --del or --delete-during
to request this improved deletion mode explicitly). See also the --delete-delay option that is a
better choice than using --delete-after.
Incremental recursion can be disabled using the --no-inc-recursive option or its shorter --no-i-r
This option increases the amount of information you are given during the transfer. By default,
rsync works silently. A single -v will give you information about what files are being transferred
and a brief summary at the end. Two -v options will give you information on what files are being
skipped and slightly more information at the end. More than two -v options should only be used if
you are debugging rsync.
Note that the names of the transferred files that are output are done using a default --out-format
of "%n%L", which tells you just the name of the file and, if the item is a link, where it points.
At the single -v level of verbosity, this does not mention when a file gets its attributes
changed. If you ask for an itemized list of changed attributes (either --itemize-changes or
adding "%i" to the --out-format setting), the output (on the client) increases to mention all
items that are changed in any way. See the --out-format option for more details.
This tells rsync to transfer modification times along with the files and update them on the remote
system. Note that if this option is not used, the optimization that excludes files that have not
been modified cannot be effective; in other words, a missing -t or -a will cause the next transfer
to behave as if it used -I, causing all files to be updated (though rsync’s delta-transfer
algorithm will make the update fairly efficient if the files haven’t actually changed, you’re much
better off using -t).
When symlinks are encountered, recreate the symlink on the destination.
Tell the sending side to include any directories that are encountered. Unlike --recursive, a
directory’s contents are not copied unless the directory name specified is "." or ends with a
trailing slash (e.g. ".", "dir/.", "dir/", etc.). Without this option or the --recursive option,
rsync will skip all directories it encounters (and output a message to that effect for each one).
If you specify both --dirs and --recursive, --recursive takes precedence.
The --dirs option is implied by the --files-from option or the --list-only option (including an
implied --list-only usage) if --recursive wasn’t specified (so that directories are seen in the
listing). Specify --no-dirs (or --no-d) if you want to turn this off.
There is also a backward-compatibility helper option, --old-dirs (or --old-d) that tells rsync to
use a hack of "-r --exclude=’/*/*’" to get an older rsync to list a single directory without
This option causes rsync to set the group of the destination file to be the same as the source
file. If the receiving program is not running as the super-user (or if --no-super was specified),
only groups that the invoking user on the receiving side is a member of will be preserved.
Without this option, the group is set to the default group of the invoking user on the receiving
The preservation of group information will associate matching names by default, but may fall back
to using the ID number in some circumstances (see also the --numeric-ids option for a full
This option causes rsync to set the owner of the destination file to be the same as the source
file, but only if the receiving rsync is being run as the super-user (see also the --super and
--fake-super options). Without this option, the owner of new and/or transferred files are set to
the invoking user on the receiving side.
The preservation of ownership will associate matching names by default, but may fall back to using
the ID number in some circumstances (see also the --numeric-ids option for a full discussion).
-D The -D option is equivalent to --devices --specials.