+If a user or group has no name on the source system or it has no match
+on the destination system, then the numeric ID
+from the source system is used instead. See also the comments on the
+"use chroot" setting in the rsyncd.conf manpage for information on how
+the chroot setting affects rsync's ability to look up the names of the
+users and groups and what you can do about it.
+
+dit(bf(--timeout=TIMEOUT)) This option allows you to set a maximum I/O
+timeout in seconds. If no data is transferred for the specified time
+then rsync will exit. The default is 0, which means no timeout.
+
+dit(bf(--address)) By default rsync will bind to the wildcard address when
+connecting to an rsync daemon. The bf(--address) option allows you to
+specify a specific IP address (or hostname) to bind to. See also this
+option in the bf(--daemon) mode section.
+
+dit(bf(--port=PORT)) This specifies an alternate TCP port number to use
+rather than the default of 873. This is only needed if you are using the
+double-colon (::) syntax to connect with an rsync daemon (since the URL
+syntax has a way to specify the port as a part of the URL). See also this
+option in the bf(--daemon) mode section.
+
+dit(bf(--blocking-io)) This tells rsync to use blocking I/O when launching
+a remote shell transport. If the remote shell is either rsh or remsh,
+rsync defaults to using
+blocking I/O, otherwise it defaults to using non-blocking I/O. (Note that
+ssh prefers non-blocking I/O.)
+
+dit(bf(--no-blocking-io)) Turn off bf(--blocking-io), for use when it is the
+default.
+
+dit(bf(-i, --itemize-changes)) Requests a simple itemized list of the
+changes that are being made to each file, including attribute changes.
+This is exactly the same as specifying bf(--log-format='%i %n%L').
+
+The "%i" escape has a cryptic output that is 9 letters long. The general
+format is like the string bf(UXcstpoga)), where bf(U) is replaced by the
+kind of update being done, bf(X) is replaced by the file-type, and the
+other letters represent attributes that may be output if they are being
+modified.
+
+The update types that replace the bf(U) are as follows:
+
+quote(itemize(
+ it() A bf(<) means that a file is being transferred to the remote host
+ (sent).
+ it() A bf(>) means that a file is being transferred to the local host
+ (received).
+ it() A bf(c) means that a local change/creation is occurring for the item
+ (such as the creation of a directory or the changing of a symlink, etc.).
+ it() A bf(h) means that the item is a hard-link to another item (requires
+ bf(--hard-links)).
+ it() A bf(.) means that the item is not being updated (though it might
+ have attributes that are being modified).
+))
+
+The file-types that replace the bf(X) are: bf(f) for a file, a bf(d) for a
+directory, an bf(L) for a symlink, and a bf(D) for a device.
+
+The other letters in the string above are the actual letters that
+will be output if the associated attribute for the item is being updated or
+a "." for no change. Three exceptions to this are: (1) a newly created
+item replaces each letter with a "+", (2) an identical item replaces the
+dots with spaces, and (3) an unknown attribute replaces each letter with
+a "?" (this can happen when talking to an older rsync).
+
+The attribute that is associated with each letter is as follows:
+
+quote(itemize(
+ it() A bf(c) means the checksum of the file is different and will be
+ updated by the file transfer (requires bf(--checksum)).
+ it() A bf(s) means the size of the file is different and will be updated
+ by the file transfer.
+ it() A bf(t) means the modification time is different and is being updated
+ to the sender's value (requires bf(--times)). An alternate value of bf(T)
+ means that the time will be set to the transfer time, which happens
+ anytime a symlink is transferred, or when a file or device is transferred
+ without bf(--times).
+ it() A bf(p) means the permissions are different and are being updated to
+ the sender's value (requires bf(--perms)).
+ it() An bf(o) means the owner is different and is being updated to the
+ sender's value (requires bf(--owner) and root privileges).
+ it() A bf(g) means the group is different and is being updated to the
+ sender's value (requires bf(--group) and the authority to set the group).
+ it() The bf(a) is reserved for a future enhanced version that supports
+ extended file attributes, such as ACLs.
+))
+
+One other output is possible: when deleting files, the "%i" will output
+the string "*deleting" for each item that is being removed (assuming that
+you are talking to a recent enough rsync that it logs deletions instead of
+outputting them as a verbose message).
+
+dit(bf(--log-format=FORMAT)) This allows you to specify exactly what the
+rsync client outputs to the user on a per-file basis. The format is a text
+string containing embedded single-character escape sequences prefixed with
+a percent (%) character. For a list of the possible escape characters, see
+the "log format" setting in the rsyncd.conf manpage. (Note that this
+option does not affect what a daemon logs to its logfile.)
+
+Specifying this option will mention each file, dir, etc. that gets updated
+in a significant way (a transferred file, a recreated symlink/device, or a
+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
+output of "%i".
+
+The bf(--verbose) option implies a format of "%n%L", but you can use
+bf(--log-format) without bv(--verbose) if you like, or you can override
+the format of its per-file output using this option.
+
+Rsync will output the log-format string prior to a file's transfer unless
+one of the transfer-statistic escapes is requested, in which case the
+logging is done at the end of the file's transfer. When this late logging
+is in effect and bf(--progress) is also specified, rsync will also output
+the name of the file being transferred prior to its progress information
+(followed, of course, by the log-format output).
+
+dit(bf(--stats)) This tells rsync to print a verbose set of statistics
+on the file transfer, allowing you to tell how effective the rsync
+algorithm is for your data.
+
+dit(bf(--partial)) By default, rsync will delete any partially
+transferred file if the transfer is interrupted. In some circumstances
+it is more desirable to keep partially transferred files. Using the
+bf(--partial) option tells rsync to keep the partial file which should
+make a subsequent transfer of the rest of the file much faster.
+
+dit(bf(--partial-dir=DIR)) A better way to keep partial files than the
+bf(--partial) option is to specify a em(DIR) that will be used to hold the
+partial data (instead of writing it out to the destination file).
+On the next transfer, rsync will use a file found in this
+dir as data to speed up the resumption of the transfer and then deletes it
+after it has served its purpose.
+Note that if bf(--whole-file) is specified (or implied), any partial-dir
+file that is found for a file that is being updated will simply be removed
+(since
+rsync is sending files without using the incremental rsync algorithm).
+
+Rsync will create the em(DIR) if it is missing (just the last dir -- not
+the whole path). This makes it easy to use a relative path (such as
+"bf(--partial-dir=.rsync-partial)") to have rsync create the
+partial-directory in the destination file's directory when needed, and then
+remove it again when the partial file is deleted.
+
+If the partial-dir value is not an absolute path, rsync will also add a directory
+bf(--exclude) of this value at the end of all your existing excludes. This
+will prevent partial-dir files from being transferred and also prevent the
+untimely deletion of partial-dir items on the receiving side. An example:
+the above bf(--partial-dir) option would add an "bf(--exclude=.rsync-partial/)"
+rule at the end of any other filter rules. Note that if you are
+supplying your own filter rules, you may need to manually insert a
+rule for this directory exclusion somewhere higher up in the list so that
+it has a high enough priority to be effective (e.g., if your rules specify
+a trailing bf(--exclude='*') rule, the auto-added rule would never be
+reached).
+
+IMPORTANT: the bf(--partial-dir) should not be writable by other users or it
+is a security risk. E.g. AVOID "/tmp".
+
+You can also set the partial-dir value the RSYNC_PARTIAL_DIR environment
+variable. Setting this in the environment does not force bf(--partial) to be
+enabled, but rather it effects where partial files go when bf(--partial) is
+specified. For instance, instead of using bf(--partial-dir=.rsync-tmp)
+along with bf(--progress), you could set RSYNC_PARTIAL_DIR=.rsync-tmp in your
+environment and then just use the bf(-P) option to turn on the use of the
+.rsync-tmp dir for partial transfers. The only time that the bf(--partial)
+option does not look for this environment value is (1) when bf(--inplace) was
+specified (since bf(--inplace) conflicts with bf(--partial-dir)), or (2) when
+bf(--delay-updates) was specified (see below).
+
+For the purposes of the daemon-config's "refuse options" setting,
+bf(--partial-dir) does em(not) imply bf(--partial). This is so that a
+refusal of the bf(--partial) option can be used to disallow the overwriting
+of destination files with a partial transfer, while still allowing the
+safer idiom provided by bf(--partial-dir).
+
+dit(bf(--delay-updates)) This option puts the temporary file from each
+updated file into a holding directory until the end of the
+transfer, at which time all the files are renamed into place in rapid
+succession. This attempts to make the updating of the files a little more
+atomic. By default the files are placed into a directory named ".~tmp~" in
+each file's destination directory, but you can override this by specifying
+the bf(--partial-dir) option. (Note that RSYNC_PARTIAL_DIR has no effect
+on this value, nor is bf(--partial-dir) considered to be implied for the
+purposes of the daemon-config's "refuse options" setting.)
+Conflicts with bf(--inplace).
+
+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
+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).
+
+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
+parallel hierarchy of files).
+
+dit(bf(--progress)) This option tells rsync to print information
+showing the progress of the transfer. This gives a bored user
+something to watch.
+Implies bf(--verbose) if it wasn't already specified.
+
+When the file is transferring, the data looks like this:
+
+verb( 782448 63% 110.64kB/s 0:00:04)
+
+This tells you the current file size, the percentage of the transfer that
+is complete, the current calculated file-completion rate (including both
+data over the wire and data being matched locally), and the estimated time
+remaining in this transfer.
+
+After a file is complete, the data looks like this:
+
+verb( 1238099 100% 146.38kB/s 0:00:08 (5, 57.1% of 396))
+
+This tells you the final file size, that it's 100% complete, the final
+transfer rate for the file, the amount of elapsed time it took to transfer
+the file, and the addition of a total-transfer summary in parentheses.
+These additional numbers tell you how many files have been updated, and
+what percent of the total number of files has been scanned.
+
+dit(bf(-P)) The bf(-P) option is equivalent to bf(--partial) bf(--progress). Its
+purpose is to make it much easier to specify these two options for a long
+transfer that may be interrupted.
+
+dit(bf(--password-file)) This option allows you to provide a password
+in a file for accessing a remote rsync daemon. Note that this option
+is only useful when accessing an rsync daemon using the built in
+transport, not when using a remote shell as the transport. The file
+must not be world readable. It should contain just the password as a
+single line.
+
+dit(bf(--list-only)) This option will cause the source files to be listed
+instead of transferred. This option is inferred if there is no destination
+specified, so you don't usually need to use it explicitly. However, it can
+come in handy for a user that wants to avoid the "bf(-r --exclude='/*/*')"
+options that rsync might use as a compatibility kluge when generating a
+non-recursive listing, or to list the files that are involved in a local
+copy (since the destination path is not optional for a local copy, you
+must specify this option explicitly and still include a destination).
+
+dit(bf(--bwlimit=KBPS)) This option allows you to specify a maximum
+transfer rate in kilobytes per second. This option is most effective when
+using rsync with large files (several megabytes and up). Due to the nature
+of rsync transfers, blocks of data are sent, then if rsync determines the
+transfer was too fast, it will wait before sending the next data block. The
+result is an average transfer rate equaling the specified limit. A value
+of zero specifies no limit.
+
+dit(bf(--write-batch=FILE)) Record a file that can later be applied to
+another identical destination with bf(--read-batch). See the "BATCH MODE"
+section for details, and also the bf(--only-write-batch) option.
+
+dit(bf(--only-write-batch=FILE)) Works like bf(--write-batch), except that
+no updates are made on the destination system when creating the batch.
+This lets you transport the changes to the destination system via some
+other means and then apply the changes via bf(--read-batch).
+
+Note that you can feel free to write the batch directly to some portable
+media: if this media fills to capacity before the end of the transfer, you
+can just apply that partial transfer to the destination and repeat the
+whole process to get the rest of the changes (as long as you don't mind a
+partially updated destination system while the multi-update cycle is
+happening).
+
+Also note that you only save bandwidth when pushing changes to a remote
+system because this allows the batched data to be diverted from the sender
+into the batch file without having to flow over the wire to the receiver
+(when pulling, the sender is remote, and thus can't write the batch).
+
+dit(bf(--read-batch=FILE)) Apply all of the changes stored in FILE, a
+file previously generated by bf(--write-batch).
+If em(FILE) is "-" the batch data will be read from standard input.
+See the "BATCH MODE" section for details.
+
+dit(bf(--protocol=NUM)) Force an older protocol version to be used. This
+is useful for creating a batch file that is compatible with an older
+version of rsync. For instance, if rsync 2.6.4 is being used with the
+bf(--write-batch) option, but rsync 2.6.3 is what will be used to run the
+bf(--read-batch) option, you should use "--protocol=28" when creating the
+batch file to force the older protocol version to be used in the batch
+file (assuming you can't upgrade the rsync on the reading system).
+
+dit(bf(-4, --ipv4) or bf(-6, --ipv6)) Tells rsync to prefer IPv4/IPv6
+when creating sockets. This only affects sockets that rsync has direct
+control over, such as the outgoing socket when directly contacting an
+rsync daemon. See also these options in the bf(--daemon) mode section.
+
+dit(bf(--checksum-seed=NUM)) Set the MD4 checksum seed to the integer
+NUM. This 4 byte checksum seed is included in each block and file
+MD4 checksum calculation. By default the checksum seed is generated
+by the server and defaults to the current time(). This option
+is used to set a specific checksum seed, which is useful for
+applications that want repeatable block and file checksums, or
+in the case where the user wants a more random checksum seed.
+Note that setting NUM to 0 causes rsync to use the default of time()
+for checksum seed.
+enddit()
+
+manpagesection(DAEMON OPTIONS)
+
+The options allowed when starting an rsync daemon are as follows:
+
+startdit()
+dit(bf(--daemon)) This tells rsync that it is to run as a daemon. The
+daemon you start running may be accessed using an rsync client using
+the bf(host::module) or bf(rsync://host/module/) syntax.
+
+If standard input is a socket then rsync will assume that it is being
+run via inetd, otherwise it will detach from the current terminal and
+become a background daemon. The daemon will read the config file
+(rsyncd.conf) on each connect made by a client and respond to
+requests accordingly. See the rsyncd.conf(5) man page for more
+details.
+
+dit(bf(--address)) By default rsync will bind to the wildcard address when
+run as a daemon with the bf(--daemon) option. The bf(--address) option
+allows you to specify a specific IP address (or hostname) to bind to. This
+makes virtual hosting possible in conjunction with the bf(--config) option.
+See also the "address" global option in the rsyncd.conf manpage.
+
+dit(bf(--bwlimit=KBPS)) This option allows you to specify a maximum
+transfer rate in kilobytes per second for the data the daemon sends.
+The client can still specify a smaller bf(--bwlimit) value, but their
+requested value will be rounded down if they try to exceed it. See the
+client version of this option (above) for some extra details.
+
+dit(bf(--config=FILE)) This specifies an alternate config file than
+the default. This is only relevant when bf(--daemon) is specified.
+The default is /etc/rsyncd.conf unless the daemon is running over
+a remote shell program and the remote user is not root; in that case
+the default is rsyncd.conf in the current directory (typically $HOME).
+
+dit(bf(--no-detach)) When running as a daemon, this option instructs
+rsync to not detach itself and become a background process. This
+option is required when running as a service on Cygwin, and may also
+be useful when rsync is supervised by a program such as
+bf(daemontools) or AIX's bf(System Resource Controller).
+bf(--no-detach) is also recommended when rsync is run under a
+debugger. This option has no effect if rsync is run from inetd or
+sshd.
+
+dit(bf(--port=PORT)) This specifies an alternate TCP port number for the
+daemon to listen on rather than the default of 873. See also the "port"
+global option in the rsyncd.conf manpage.
+
+dit(bf(-v, --verbose)) This option increases the amount of information the
+daemon logs during its startup phase. After the client connects, the
+daemon's verbosity level will be controlled by the options that the client
+used and the "max verbosity" setting in the module's config section.
+
+dit(bf(-4, --ipv4) or bf(-6, --ipv6)) Tells rsync to prefer IPv4/IPv6
+when creating the incoming sockets that the rsync daemon will use to
+listen for connections. One of these options may be required in older
+versions of Linux to work around an IPv6 bug in the kernel (if you see
+an "address already in use" error when nothing else is using the port,
+try specifying bf(--ipv6) or bf(--ipv4) when starting the daemon).
+
+dit(bf(-h, --help)) When specified after bf(--daemon), print a short help
+page describing the options available for starting an rsync daemon.
+enddit()
+
+manpagesection(FILTER RULES)
+
+The filter rules allow for flexible selection of which files to transfer
+(include) and which files to skip (exclude). The rules either directly
+specify include/exclude patterns or they specify a way to acquire more
+include/exclude patterns (e.g. to read them from a file).
+
+As the list of files/directories to transfer is built, rsync checks each
+name to be transferred against the list of include/exclude patterns in
+turn, and the first matching pattern is acted on: if it is an exclude
+pattern, then that file is skipped; if it is an include pattern then that
+filename is not skipped; if no matching pattern is found, then the
+filename is not skipped.
+
+Rsync builds an ordered list of filter rules as specified on the
+command-line. Filter rules have the following syntax:
+
+quote(
+tt(RULE [PATTERN_OR_FILENAME])nl()
+tt(RULE,MODIFIERS [PATTERN_OR_FILENAME])nl()
+)
+
+You have your choice of using either short or long RULE names, as described
+below. If you use a short-named rule, the ',' separating the RULE from the
+MODIFIERS is optional. The PATTERN or FILENAME that follows (when present)
+must come after either a single space or an underscore (_).
+Here are the available rule prefixes:
+
+quote(
+bf(exclude, -) specifies an exclude pattern. nl()
+bf(include, +) specifies an include pattern. nl()
+bf(merge, .) specifies a merge-file to read for more rules. nl()
+bf(dir-merge, :) specifies a per-directory merge-file. nl()
+bf(hide, H) specifies a pattern for hiding files from the transfer. nl()
+bf(show, S) files that match the pattern are not hidden. nl()
+bf(protect, P) specifies a pattern for protecting files from deletion. nl()
+bf(risk, R) files that match the pattern are not protected. nl()
+bf(clear, !) clears the current include/exclude list (takes no arg) nl()
+)
+
+When rules are being read from a file, empty lines are ignored, as are
+comment lines that start with a "#".
+
+Note that the bf(--include)/bf(--exclude) command-line options do not allow the
+full range of rule parsing as described above -- they only allow the
+specification of include/exclude patterns plus a "!" token to clear the
+list (and the normal comment parsing when rules are read from a file).
+If a pattern
+does not begin with "- " (dash, space) or "+ " (plus, space), then the
+rule will be interpreted as if "+ " (for an include option) or "- " (for
+an exclude option) were prefixed to the string. A bf(--filter) option, on
+the other hand, must always contain either a short or long rule name at the
+start of the rule.
+
+Note also that the bf(--filter), bf(--include), and bf(--exclude) options take one
+rule/pattern each. To add multiple ones, you can repeat the options on
+the command-line, use the merge-file syntax of the bf(--filter) option, or
+the bf(--include-from)/bf(--exclude-from) options.
+
+manpagesection(INCLUDE/EXCLUDE PATTERN RULES)
+
+You can include and exclude files by specifying patterns using the "+",
+"-", etc. filter rules (as introduced in the FILTER RULES section above).
+The include/exclude rules each specify a pattern that is matched against
+the names of the files that are going to be transferred. These patterns
+can take several forms:
+
+itemize(
+ it() if the pattern starts with a / then it is anchored to a
+ particular spot in the hierarchy of files, otherwise it is matched
+ against the end of the pathname. This is similar to a leading ^ in
+ regular expressions.
+ Thus "/foo" would match a file called "foo" at either the "root of the
+ transfer" (for a global rule) or in the merge-file's directory (for a
+ per-directory rule).
+ An unqualified "foo" would match any file or directory named "foo"
+ anywhere in the tree because the algorithm is applied recursively from
+ the
+ top down; it behaves as if each path component gets a turn at being the
+ end of the file name. Even the unanchored "sub/foo" would match at
+ any point in the hierarchy where a "foo" was found within a directory
+ named "sub". See the section on ANCHORING INCLUDE/EXCLUDE PATTERNS for
+ a full discussion of how to specify a pattern that matches at the root
+ of the transfer.
+ it() if the pattern ends with a / then it will only match a
+ directory, not a file, link, or device.
+ it() if the pattern contains a wildcard character from the set
+ *?[ then expression matching is applied using the shell filename
+ matching rules. Otherwise a simple string match is used.
+ it() the double asterisk pattern "**" will match slashes while a
+ single asterisk pattern "*" will stop at slashes.
+ it() if the pattern contains a / (not counting a trailing /) or a "**"
+ then it is matched against the full pathname, including any leading
+ directories. If the pattern doesn't contain a / or a "**", then it is
+ matched only against the final component of the filename.
+ (Remember that the algorithm is applied recursively so "full filename"
+ can actually be any portion of a path from the starting directory on
+ down.)
+)
+
+Note that, when using the bf(--recursive) (bf(-r)) option (which is implied by
+bf(-a)), every subcomponent of every path is visited from the top down, so
+include/exclude patterns get applied recursively to each subcomponent's
+full name (e.g. to include "/foo/bar/baz" the subcomponents "/foo" and
+"/foo/bar" must not be excluded).
+The exclude patterns actually short-circuit the directory traversal stage
+when rsync finds the files to send. If a pattern excludes a particular
+parent directory, it can render a deeper include pattern ineffectual
+because rsync did not descend through that excluded section of the
+hierarchy. This is particularly important when using a trailing '*' rule.
+For instance, this won't work:
+
+quote(
+tt(+ /some/path/this-file-will-not-be-found)nl()
+tt(+ /file-is-included)nl()
+tt(- *)nl()
+)
+
+This fails because the parent directory "some" is excluded by the '*'
+rule, so rsync never visits any of the files in the "some" or "some/path"
+directories. One solution is to ask for all directories in the hierarchy
+to be included by using a single rule: "+ */" (put it somewhere before the
+"- *" rule). Another solution is to add specific include rules for all
+the parent dirs that need to be visited. For instance, this set of rules
+works fine:
+
+quote(
+tt(+ /some/)nl()
+tt(+ /some/path/)nl()
+tt(+ /some/path/this-file-is-found)nl()
+tt(+ /file-also-included)nl()
+tt(- *)nl()
+)
+
+Here are some examples of exclude/include matching:
+
+itemize(
+ it() "- *.o" would exclude all filenames matching *.o
+ it() "- /foo" would exclude a file called foo in the transfer-root directory
+ it() "- foo/" would exclude any directory called foo
+ it() "- /foo/*/bar" would exclude any file called bar two
+ levels below a directory called foo in the transfer-root directory
+ it() "- /foo/**/bar" would exclude any file called bar two
+ or more levels below a directory called foo in the transfer-root directory
+ it() The combination of "+ */", "+ *.c", and "- *" would include all
+ directories and C source files but nothing else.
+ it() The combination of "+ foo/", "+ foo/bar.c", and "- *" would include
+ only the foo directory and foo/bar.c (the foo directory must be
+ explicitly included or it would be excluded by the "*")
+)
+
+manpagesection(MERGE-FILE FILTER RULES)
+
+You can merge whole files into your filter rules by specifying either a
+merge (.) or a dir-merge (:) filter rule (as introduced in the FILTER RULES
+section above).
+
+There are two kinds of merged files -- single-instance ('.') and
+per-directory (':'). A single-instance merge file is read one time, and
+its rules are incorporated into the filter list in the place of the "."
+rule. For per-directory merge files, rsync will scan every directory that
+it traverses for the named file, merging its contents when the file exists
+into the current list of inherited rules. These per-directory rule files
+must be created on the sending side because it is the sending side that is
+being scanned for the available files to transfer. These rule files may
+also need to be transferred to the receiving side if you want them to
+affect what files don't get deleted (see PER-DIRECTORY RULES AND DELETE
+below).
+
+Some examples:
+
+quote(
+tt(merge /etc/rsync/default.rules)nl()
+tt(. /etc/rsync/default.rules)nl()
+tt(dir-merge .per-dir-filter)nl()
+tt(dir-merge,n- .non-inherited-per-dir-excludes)nl()
+tt(:n- .non-inherited-per-dir-excludes)nl()
+)
+
+The following modifiers are accepted after a merge or dir-merge rule:
+
+itemize(
+ it() A bf(-) specifies that the file should consist of only exclude
+ patterns, with no other rule-parsing except for in-file comments.
+ it() A bf(+) specifies that the file should consist of only include
+ patterns, with no other rule-parsing except for in-file comments.
+ it() A bf(C) is a way to specify that the file should be read in a
+ CVS-compatible manner. This turns on 'n', 'w', and '-', but also
+ allows the list-clearing token (!) to be specified. If no filename is
+ provided, ".cvsignore" is assumed.
+ it() A bf(e) will exclude the merge-file name from the transfer; e.g.
+ "dir-merge,e .rules" is like "dir-merge .rules" and "- .rules".
+ it() An bf(n) specifies that the rules are not inherited by subdirectories.
+ it() A bf(w) specifies that the rules are word-split on whitespace instead
+ of the normal line-splitting. This also turns off comments. Note: the
+ space that separates the prefix from the rule is treated specially, so
+ "- foo + bar" is parsed as two rules (assuming that prefix-parsing wasn't
+ also disabled).
+ it() You may also specify any of the modifiers for the "+" or "-" rules
+ (below) in order to have the rules that are read-in from the file
+ default to having that modifier set. For instance, "merge,-/ .excl" would
+ treat the contents of .excl as absolute-path excludes,
+ while "dir-merge,s .filt" and ":sC" would each make all their
+ per-directory rules apply only on the sending side.
+)
+
+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,
+ "-/ /etc/passwd" would exclude the passwd file any time the transfer
+ was sending files from the "/etc" directory.
+ it() A "!" specifies that the include/exclude should take effect if
+ the pattern fails to match. For instance, "-! */" would exclude all
+ non-directories.
+ it() A bf(C) is used to indicate that all the global CVS-exclude rules
+ should be inserted as excludes in place of the "-C". No arg should
+ follow.
+ it() An bf(s) is used to indicate that the rule applies to the sending
+ side. When a rule affects the sending side, it prevents files from
+ being transferred. The default is for a rule to affect both sides
+ unless bf(--delete-excluded) was specified, in which case default rules
+ become sender-side only. See also the hide (H) and show (S) rules,
+ which are an alternate way to specify sending-side includes/excludes.
+ it() An bf(r) is used to indicate that the rule applies to the receiving
+ side. When a rule affects the receiving side, it prevents files from
+ being deleted. See the bf(s) modifier for more info. See also the
+ protect (P) and risk (R) rules, which are an alternate way to
+ specify receiver-side includes/excludes.
+)
+
+Per-directory rules are inherited in all subdirectories of the directory
+where the merge-file was found unless the 'n' modifier was used. Each
+subdirectory's rules are prefixed to the inherited per-directory rules
+from its parents, which gives the newest rules a higher priority than the
+inherited rules. The entire set of dir-merge rules are grouped together in
+the spot where the merge-file was specified, so it is possible to override
+dir-merge rules via a rule that got specified earlier in the list of global
+rules. When the list-clearing rule ("!") is read from a per-directory
+file, it only clears the inherited rules for the current merge file.
+
+Another way to prevent a single rule from a dir-merge file from being inherited is to
+anchor it with a leading slash. Anchored rules in a per-directory
+merge-file are relative to the merge-file's directory, so a pattern "/foo"
+would only match the file "foo" in the directory where the dir-merge filter
+file was found.
+
+Here's an example filter file which you'd specify via bf(--filter=". file":)
+
+quote(
+tt(merge /home/user/.global-filter)nl()
+tt(- *.gz)nl()
+tt(dir-merge .rules)nl()
+tt(+ *.[ch])nl()
+tt(- *.o)nl()
+)
+
+This will merge the contents of the /home/user/.global-filter file at the
+start of the list and also turns the ".rules" filename into a per-directory
+filter file. All rules read-in prior to the start of the directory scan
+follow the global anchoring rules (i.e. a leading slash matches at the root
+of the transfer).
+
+If a per-directory merge-file is specified with a path that is a parent
+directory of the first transfer directory, rsync will scan all the parent
+dirs from that starting point to the transfer directory for the indicated
+per-directory file. For instance, here is a common filter (see bf(-F)):