Made showchg() use safe_fname().
[rsync/rsync.git] / rsync.yo
index 3454160..7bc0e4c 100644 (file)
--- a/rsync.yo
+++ b/rsync.yo
@@ -324,7 +324,7 @@ to the detailed description below for a complete description.  verb(
  -O, --omit-dir-times        omit directories when preserving times
  -S, --sparse                handle sparse files efficiently
  -n, --dry-run               show what would have been transferred
- -W, --whole-file            copy files whole
+ -W, --whole-file            copy files whole (without rsync algorithm)
      --no-whole-file         always use incremental rsync algorithm
  -x, --one-file-system       don't cross filesystem boundaries
  -B, --block-size=SIZE       force a fixed checksum block-size
@@ -350,21 +350,22 @@ to the detailed description below for a complete description.  verb(
  -I, --ignore-times          don't skip files that match size and time
      --size-only             skip files that match in size
      --modify-window=NUM     compare mod-times with reduced accuracy
- -T  --temp-dir=DIR          create temporary files in directory DIR
+ -T, --temp-dir=DIR          create temporary files in directory DIR
+ -y, --fuzzy                 find similar file for basis if no dest file
      --compare-dest=DIR      also compare received files relative to DIR
      --copy-dest=DIR         ... and include copies of unchanged files
      --link-dest=DIR         hardlink to files in DIR when unchanged
- -z, --compress              compress file data
+ -z, --compress              compress file data during the transfer
  -C, --cvs-exclude           auto-ignore files in the same way CVS does
  -f, --filter=RULE           add a file-filtering RULE
- -F                          same as --filter=': /.rsync-filter'
+ -F                          same as --filter='dir-merge /.rsync-filter'
                              repeated: --filter='- .rsync-filter'
      --exclude=PATTERN       exclude files matching PATTERN
      --exclude-from=FILE     read exclude patterns from FILE
      --include=PATTERN       don't exclude files matching PATTERN
      --include-from=FILE     read include patterns from FILE
      --files-from=FILE       read list of source-file names from FILE
- -0  --from0                 all *from file lists are delimited by nulls
+ -0, --from0                 all *from file lists are delimited by nulls
      --version               print version number
      --port=PORT             specify double-colon alternate port number
      --blocking-io           use blocking I/O for the remote shell
@@ -372,6 +373,7 @@ to the detailed description below for a complete description.  verb(
      --stats                 give some file-transfer stats
      --progress              show progress during transfer
  -P                          same as --partial --progress
+ -i, --itemize-changes       output a change-summary for all updates
      --log-format=FORMAT     log file-transfers using specified format
      --password-file=FILE    read password from FILE
      --list-only             list the files instead of copying them
@@ -379,8 +381,8 @@ to the detailed description below for a complete description.  verb(
      --write-batch=FILE      write a batched update to FILE
      --read-batch=FILE       read a batched update from FILE
      --checksum-seed=NUM     set block/file checksum seed (advanced)
- -4  --ipv4                  prefer IPv4
- -6  --ipv6                  prefer IPv6
+ -4, --ipv4                  prefer IPv4
+ -6, --ipv6                  prefer IPv6
  -h, --help                  show this help screen)
 
 Rsync can also be run as a daemon, in which case the following options are
@@ -392,8 +394,8 @@ accepted: verb(
      --no-detach             do not detach from the parent
      --port=PORT             listen on alternate port number
  -v, --verbose               increase verbosity
- -4  --ipv4                  prefer IPv4
- -6  --ipv6                  prefer IPv6
+ -4, --ipv4                  prefer IPv4
+ -6, --ipv6                  prefer IPv6
  -h, --help                  show this help screen)
 
 manpageoptions()
@@ -679,7 +681,9 @@ send the whole directory (e.g. "dir" or "dir/") without using a wildcard
 for the directory's contents (e.g. "dir/*") since the wildcard is expanded
 by the shell and rsync thus gets a request to transfer individual files, not
 the files' parent directory.  Files that are excluded from transfer are
-excluded from being deleted unless you use bf(--delete-excluded).
+also excluded from being deleted unless you use the bf(--delete-excluded)
+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.
 
@@ -726,6 +730,9 @@ See bf(--delete) (which is implied) for more details on file-deletion.
 dit(bf(--delete-excluded)) In addition to deleting the files on the
 receiving side that are not on the sending side, this tells rsync to also
 delete any files on the receiving side that are excluded (see bf(--exclude)).
+See the FILTER RULES section for a way to make individual exclusions behave
+this way on the receiver, and for a way to protect files from
+bf(--delete-excluded).
 See bf(--delete) (which is implied) for more details on file-deletion.
 
 dit(bf(--ignore-errors)) Tells bf(--delete) to go ahead and delete files
@@ -904,6 +911,16 @@ scratch directory when creating temporary copies of the files
 transferred on the receiving side.  The default behavior is to create
 the temporary files in the receiving directory.
 
+dit(bf(-y, --fuzzy)) This option tells rsync that it should look for a
+basis file for any destination file that is missing.  The current algorithm
+looks in the same directory as the destination file for either a file that
+has an identical size and modified-time, or a similarly-named file.  If
+found, rsync uses the fuzzy basis file to try to speed up the transfer.
+
+Note that the use of the bf(--delete) option might get rid of any potential
+fuzzy-match files, so either use bf(--delete-after) or specify some
+filename exclusions if you need to prevent this.
+
 dit(bf(--compare-dest=DIR)) This option instructs rsync to use em(DIR) on
 the destination machine as an additional hierarchy to compare destination
 files against doing transfers (if the files are missing in the destination
@@ -951,15 +968,14 @@ bf(--link-dest) from working properly for a non-root user when bf(-o) was specif
 (or implied by bf(-a)).  You can work-around this bug by avoiding the bf(-o) option
 when sending to an old rsync.
 
-dit(bf(-z, --compress)) With this option, rsync compresses any data from
-the files that it sends to the destination machine.  This
-option is useful on slow connections.  The compression method used is the
-same method that gzip uses.
+dit(bf(-z, --compress)) With this option, rsync compresses the file data
+as it is sent to the destination machine, which reduces the amount of data
+being transmitted -- something that is useful over a slow connection.
 
-Note this this option typically achieves better compression ratios
-that can be achieved by using a compressing remote shell, or a
-compressing transport, as it takes advantage of the implicit
-information sent for matching data blocks.
+Note this this option typically achieves better compression ratios that can
+be achieved by using a compressing remote shell or a compressing transport
+because it takes advantage of the implicit information in the matching data
+blocks that are not explicitly sent over the connection.
 
 dit(bf(--numeric-ids)) With this option rsync will transfer numeric group
 and user IDs rather than using user and group names and mapping them
@@ -996,6 +1012,39 @@ 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)) Outputs a change-summary for each updated
+item.  The format is as follows:
+
+quote(tt(  *XcstpogDL ITEM_NAME))
+
+The bf(*) will be present if this is a file that is being transferred,
+otherwise it will be replaced with a space.  The bf(X) will be replaced by
+one of the following: an "f" for a file, a "d" for a dir, an "L" for a
+symlink, or a "D" for a device.  The rest of the letters in the string
+above are the actual letters that will be output if the associated
+attribute for the item is being updated; if not the letter will be replaced
+by either a "-" if no change is occurring, or a "+" if this is a new item.
+The meanings of the attribute letters are as follows:
+
+quote(itemize(
+  it() A bf(c) means the checksum of the file is different and will be
+  updated by the file transfer (requries 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 modified time is being updated to the server's
+  value (requires --times, but transferred files without --times will be
+  marked with a bf(T) because the time is updated to the transfer time).
+  it() A bf(p) means the permissions are being updated (requires
+  bf(--perms)).
+  it() An bf(o) means the owner is being updated (requires bf(--owner) and
+  root privileges).
+  it() A bf(g) means the group is being updated (requires bf(--group)).
+  it() A bf(D) means the device is being updated (requires bf(--devices)
+  and root privileges).
+  it() An bf(L) means the symlink value is being updated (requires
+  --links).
+))
+
 dit(bf(--log-format=FORMAT)) This allows you to specify exactly what the
 rsync client logs to stdout on a per-file basis. The log format is
 specified using the same format conventions as the log format option in
@@ -1255,6 +1304,10 @@ 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()
 )
 
@@ -1279,8 +1332,8 @@ the bf(--include-from)/bf(--exclude-from) options.
 
 manpagesection(INCLUDE/EXCLUDE PATTERN RULES)
 
-You can include and exclude files by specifying patterns using the "+" and
-"-" filter rules (as introduced in the FILTER RULES section above).
+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:
@@ -1419,7 +1472,9 @@ itemize(
   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.
+  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 server side.
 )
 
 The following modifiers are accepted after a "+" or "-":
@@ -1435,7 +1490,18 @@ itemize(
   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 server-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