Added the ability to prefix "no-" to various options, which gives the
[rsync/rsync.git] / rsync.yo
index b4e116e..12bd07d 100644 (file)
--- a/rsync.yo
+++ b/rsync.yo
@@ -1,5 +1,5 @@
 mailto(rsync-bugs@samba.org)
-manpage(rsync)(1)(7 Jul 2005)()()
+manpage(rsync)(1)(28 Jul 2005)()()
 manpagename(rsync)(faster, flexible replacement for rcp)
 manpagesynopsis()
 
@@ -135,10 +135,12 @@ You can also use rsync in local-only mode, where both the source and
 destination don't have a ':' in the name. In this case it behaves like
 an improved copy command.
 
+Finally, you can list all the (listable) modules available from a
+particular rsync daemon by leaving off the module name:
+
 quote(tt(rsync somehost.mydomain.com::))
 
-This would list all the anonymous rsync modules available on the host
-somehost.mydomain.com.  (See the following section for more details.)
+See the following section for more details.
 
 manpagesection(ADVANCED USAGE)
 
@@ -478,26 +480,40 @@ dit(bf(-R, --relative)) Use relative paths. This means that the full path
 names specified on the command line are sent to the server rather than
 just the last parts of the filenames. This is particularly useful when
 you want to send several different directories at the same time. For
-example, if you used the command
+example, if you used this command:
 
-quote(tt(   rsync /foo/bar/foo.c remote:/tmp/))
+quote(tt(   rsync -av /foo/bar/baz.c remote:/tmp/))
 
-then this would create a file called foo.c in /tmp/ on the remote
+... this would create a file called baz.c in /tmp/ on the remote
 machine. If instead you used
 
-quote(tt(   rsync -R /foo/bar/foo.c remote:/tmp/))
+quote(tt(   rsync -avR /foo/bar/baz.c remote:/tmp/))
 
-then a file called /tmp/foo/bar/foo.c would be created on the remote
+then a file called /tmp/foo/bar/baz.c would be created on the remote
 machine -- the full path name is preserved.  To limit the amount of
-path information that is sent, do something like this:
+path information that is sent, you have a couple options:  (1) With
+a modern rsync on the sending side (beginning with 2.6.7), you can
+insert a dot dir into the source path, like this:
+
+quote(tt(   rsync -avR /foo/./bar/baz.c remote:/tmp/))
+
+That would create /tmp/bar/baz.c on the remote machine.  (Note that the
+dot dir must followed by a slash, so "/foo/." would not be abbreviated.)
+(2) For older rsync versions, you would need to use a chdir to limit the
+source path.  For example, when pushing files:
+
+quote(tt(   (cd /foo; rsync -avR bar/baz.c remote:/tmp/) ))
+
+(Note that the parens put the two commands into a sub-shell, so that the
+"cd" command doesn't remain in effect for future commands.)
+If you're pulling files, use this idiom (which doesn't work with an
+rsync daemon):
 
 quote(
-tt(   cd /foo)nl()
-tt(   rsync -R bar/foo.c remote:/tmp/)nl()
+tt(   rsync -avR --rsync-path="cd /foo; rsync" \ )nl()
+tt(       remote:bar/baz.c /tmp/)
 )
 
-That would create /tmp/bar/foo.c on the remote machine.
-
 dit(bf(--no-relative)) Turn off the bf(--relative) option.  This is only
 needed if you want to use bf(--files-from) without its implied bf(--relative)
 file processing.
@@ -571,9 +587,10 @@ dit(bf(--append)) This causes rsync to update a file by appending data onto
 the end of the file, which presumes that the data that already exists on
 the receiving side is identical with the start of the file on the sending
 side.  If that is not true, the file will fail the checksum test, and the
-resend will do a normal bf(--inplace) update to correct the mismatch.  Any
-file on the receiving side that is longer than a file on the sending side
-is skipped.  Implies bf(--inplace).
+resend will do a normal bf(--inplace) update to correct the mismatched data.
+Only files on the receiving side that are shorter than the corresponding
+file on the sending side (as well as new files) are sent.
+Implies bf(--inplace).
 
 dit(bf(-d, --dirs)) Tell the sending side to include any directories that
 are encountered.  Unlike bf(--recursive), a directory's contents are not copied
@@ -2087,7 +2104,7 @@ url(http://rsync.samba.org/)(http://rsync.samba.org/)
 
 manpagesection(VERSION)
 
-This man page is current for version 2.6.6pre1 of rsync.
+This man page is current for version 2.6.6 of rsync.
 
 manpagesection(CREDITS)