manpagename(rsync)(faster, flexible replacement for rcp)
manpagesynopsis()
+rsync [OPTION]... SRC [SRC]... DEST
+
rsync [OPTION]... SRC [SRC]... [USER@]HOST:DEST
-rsync [OPTION]... [USER@]HOST:SRC [DEST]
+rsync [OPTION]... SRC [SRC]... [USER@]HOST::DEST
-rsync [OPTION]... SRC [SRC]... DEST
+rsync [OPTION]... SRC [SRC]... rsync://[USER@]HOST[:PORT]/DEST
-rsync [OPTION]... [USER@]HOST::SRC [DEST]
+rsync [OPTION]... [USER@]HOST:SRC [DEST]
-rsync [OPTION]... SRC [SRC]... [USER@]HOST::DEST
+rsync [OPTION]... [USER@]HOST::SRC [DEST]
rsync [OPTION]... rsync://[USER@]HOST[:PORT]/SRC [DEST]
-rsync [OPTION]... SRC [SRC]... rsync://[USER@]HOST[:PORT]/DEST
-
manpagedescription()
rsync is a program that behaves in much the same way that rcp does,
You can also specify any remote shell you like, either by using the bf(-e)
command line option, or by setting the RSYNC_RSH environment variable.
-One common substitute is to use ssh, which offers a high degree of
-security.
-
Note that rsync must be installed on both the source and destination
machines.
option or mark the rules as only matching on the sending side (see the
include/exclude modifiers in the FILTER RULES section).
-This option has no effect unless directory recursion is enabled.
+Prior to rsync 2.6.7, this option would have no effect unless bf(--recursive)
+was in effect. Beginning with 2.6.7, deletions will also occur when bf(--dirs)
+is specified, but only for directories whose contents are being copied.
This option can be dangerous if used incorrectly! It is a very good idea
to run first using the bf(--dry-run) option (bf(-n)) to see what files would be
dit(bf(--max-size=SIZE)) This tells rsync to avoid transferring any
file that is larger than the specified SIZE. The SIZE value can be
-suffixed with a letter to indicate a size multiplier (K, M, or G) and
+suffixed with a string to indicate a size multiplier, and
may be a fractional value (e.g. "bf(--max-size=1.5m)").
+The suffixes are as follows: "K" (or "k") is a kilobyte (1024),
+"M" (or "m") is a megabyte (1024*1024), and "G" (or "g") is a
+gigabyte (1024*1024*1024).
+If you want the multiplier to be 1000 instead of 1024, suffix the K, G, or
+M with a "T" (or "t") to indicate that a power of 10 is desired.
+Finally, if the suffix ends in either "+1" or "-1", the value will
+be offset by one byte in the indicated direction.
+Examples: --max-size=1.5mt-1 is 1499999 bytes, and --max-size=2g+1 is
+2147483649 bytes.
+
dit(bf(-B, --block-size=BLOCKSIZE)) This forces the block size used in
the rsync algorithm to a fixed value. It is normally selected based on
the size of each file being updated. See the technical report for details.
touched directory) unless the itemized-changes escape (%i) is included in
the string, in which case the logging of names increases to mention any
item that is changed in any way (as long as the receiving side is at least
-2.6.4). See the bf(--itemized-changes) option for a description of the
+2.6.4). See the bf(--itemize-changes) option for a description of the
output of "%i".
The bf(--verbose) option implies a format of "%n%L", but you can use
This option uses more memory on the receiving side (one bit per file
transferred) and also requires enough free disk space on the receiving
side to hold an additional copy of all the updated files. Note also that
-you should not use an absolute path to bf(--partial-dir) unless there is no
+you should not use an absolute path to bf(--partial-dir) unless (1)
+there is no
chance of any of the files in the transfer having the same name (since all
the updated files will be put into a single directory if the path is
-absolute).
+absolute)
+and (2) there are no mount points in the hierarchy (since the
+delayed updates will fail if they can't be renamed into place).
See also the "atomic-rsync" perl script in the "support" subdir for an
update algorithm that is even more atomic (it uses bf(--link-dest) and a
The following modifiers are accepted after a "+" or "-":
itemize(
- it() A "/" specifies that the include/exclude should be treated as an
- absolute path, relative to the root of the filesystem. For example,
+ it() A "/" specifies that the include/exclude rule should be matched
+ against the absolute pathname of the current item. For example,
"-/ /etc/passwd" would exclude the passwd file any time the transfer
- was sending files from the "/etc" directory.
+ was sending files from the "/etc" directory, and "-/ subdir/foo"
+ would always exclude "foo" when it is in a dir named "subdir", even
+ if "foo" is at the root of the current transfer.
it() A "!" specifies that the include/exclude should take effect if
the pattern fails to match. For instance, "-! */" would exclude all
non-directories.