Wayne,

Attached is a patch worth of suggested man page improvements for
--no-implied-dirs and --keep-dirlinks.  I think new users would find my
explanations clearer and more complete, although you may want to make
additional changes.  I regenerated rsync.1 and the patch includes
changes to it, but my yodl is somewhat weird, so I suggest you run yodl
again yourself.
-- 
Matt McCutchen
[EMAIL PROTECTED]
http://hashproduct.metaesthetics.net/
Index: rsync.1
===================================================================
RCS file: /cvsroot/rsync/rsync.1,v
retrieving revision 1.370
diff -u -r1.370 rsync.1
--- rsync.1	23 Feb 2006 00:43:03 -0000	1.370
+++ rsync.1	24 Feb 2006 02:23:56 -0000
@@ -645,15 +645,20 @@
 .IP 
 .IP "\fB--no-implied-dirs\fP" 
 When combined with the \fB--relative\fP option, the
-implied directories in each path are not explicitly duplicated as part
-of the transfer\&.  This makes the transfer more optimal and also allows
-the two sides to have non-matching symlinks in the implied part of the
-path\&.  For instance, if you transfer the file "/path/foo/file" with \fB-R\fP,
-the default is for rsync to ensure that "/path" and "/path/foo" on the
-destination exactly match the directories/symlinks of the source\&.  Using
-the \fB--no-implied-dirs\fP option would omit both of these implied dirs,
-which means that if "/path" was a real directory on one machine and a
-symlink of the other machine, rsync would not try to change this\&.
+attributes of the implied directories in each path are not transferred and
+are not applied in the destination\&.  This makes the transfer smaller and stops
+the receiving rsync from changing implied directories into symlinks to
+directories and vice versa in order to match the sender\&.
+For instance, if you transfer the file "path/foo/file" with \fB-R\fP
+and "path/foo" is a symlink to "bar" in the destination, the receiving rsync
+ordinarily deletes "path/foo", recreates it as a directory, and receives the
+file into the new directory\&.  With \fB--no-implied-dirs\fP, the receiving rsync
+follows the symlink and the file ends up at "path/bar/file"\&.  In the same way,
+without \fB--no-implied-dirs\fP, the receiving rsync would replace an implied
+directory with a symlink to match the sender, which would prevent files from
+being received if the symlink is dangling on the receiver\&.  See also
+\fB--keep-dirlinks\fP, which stops the receiving rsync from changing symlinks
+to directories into real directories\&.
 .IP 
 .IP "\fB-b, --backup\fP" 
 With this option, preexisting destination files are
@@ -781,9 +786,19 @@
 This option can be quite slow, so only use it if you need it\&.
 .IP 
 .IP "\fB-K, --keep-dirlinks\fP" 
-On the receiving side, if a symlink is
-pointing to a directory, it will be treated as matching a directory
-from the sender\&.
+Makes a directory on the sender match
+a symlink to a directory on the receiver\&.  Without this option,
+the receiver\&'s symlink would be deleted and replaced with a real directory\&.
+For example, suppose you transfer a directory "foo" that contains a file
+"file", but "foo" is a symlink to "bar" on the receiver\&.  Without
+\fB--keep-dirlinks\fP, the receiver deletes "foo", recreates it as a directory,
+and receives the file into the new directory; with \fB--keep-dirlinks\fP,
+the receiver follows the symlink and the file ends up at "bar/file"\&.
+.IP 
+Symlinks on the sender always replace directories on the receiver, but if
+you use \fB--copy-links\fP, the sender will pretend the symlinks are directories
+so that they match the receiver\&'s directories (and the receiver\&'s symlinks to
+directories if you use \fB--keep-dirlinks\fP)\&.
 .IP 
 .IP "\fB-W, --whole-file\fP" 
 With this option the incremental rsync algorithm
Index: rsync.yo
===================================================================
RCS file: /cvsroot/rsync/rsync.yo,v
retrieving revision 1.358
diff -u -r1.358 rsync.yo
--- rsync.yo	23 Feb 2006 00:40:58 -0000	1.358
+++ rsync.yo	24 Feb 2006 02:23:58 -0000
@@ -559,15 +559,20 @@
 )
 
 dit(bf(--no-implied-dirs)) When combined with the bf(--relative) option, the
-implied directories in each path are not explicitly duplicated as part
-of the transfer.  This makes the transfer more optimal and also allows
-the two sides to have non-matching symlinks in the implied part of the
-path.  For instance, if you transfer the file "/path/foo/file" with bf(-R),
-the default is for rsync to ensure that "/path" and "/path/foo" on the
-destination exactly match the directories/symlinks of the source.  Using
-the bf(--no-implied-dirs) option would omit both of these implied dirs,
-which means that if "/path" was a real directory on one machine and a
-symlink of the other machine, rsync would not try to change this.
+attributes of the implied directories in each path are not transferred and
+are not applied in the destination.  This makes the transfer smaller and stops
+the receiving rsync from changing implied directories into symlinks to
+directories and vice versa in order to match the sender.
+For instance, if you transfer the file "path/foo/file" with bf(-R)
+and "path/foo" is a symlink to "bar" in the destination, the receiving rsync
+ordinarily deletes "path/foo", recreates it as a directory, and receives the
+file into the new directory.  With bf(--no-implied-dirs), the receiving rsync
+follows the symlink and the file ends up at "path/bar/file".  In the same way,
+without bf(--no-implied-dirs), the receiving rsync would replace an implied
+directory with a symlink to match the sender, which would prevent files from
+being received if the symlink is dangling on the receiver.  See also
+bf(--keep-dirlinks), which stops the receiving rsync from changing symlinks
+to directories into real directories.
 
 dit(bf(-b, --backup)) With this option, preexisting destination files are
 renamed as each file is transferred or deleted.  You can control where the
@@ -682,9 +687,19 @@
 
 This option can be quite slow, so only use it if you need it.
 
-dit(bf(-K, --keep-dirlinks)) On the receiving side, if a symlink is
-pointing to a directory, it will be treated as matching a directory
-from the sender.
+dit(bf(-K, --keep-dirlinks)) Makes a directory on the sender match
+a symlink to a directory on the receiver.  Without this option,
+the receiver's symlink would be deleted and replaced with a real directory.
+For example, suppose you transfer a directory "foo" that contains a file
+"file", but "foo" is a symlink to "bar" on the receiver.  Without
+bf(--keep-dirlinks), the receiver deletes "foo", recreates it as a directory,
+and receives the file into the new directory; with bf(--keep-dirlinks),
+the receiver follows the symlink and the file ends up at "bar/file".
+
+Symlinks on the sender always replace directories on the receiver, but if
+you use bf(--copy-links), the sender will pretend the symlinks are directories
+so that they match the receiver's directories (and the receiver's symlinks to
+directories if you use bf(--keep-dirlinks)).
 
 dit(bf(-W, --whole-file)) With this option the incremental rsync algorithm
 is not used and the whole file is sent as-is instead.  The transfer may be
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to