rsync.yo doc patch

Wayne Davison wayned at samba.org
Fri Jan 23 01:56:12 GMT 2004


On Thu, Jan 22, 2004 at 05:13:33PM -0800, jw schultz wrote:
> Let's keep the examples in the example, description order.

Unfortunately, the indentation does make that order a little confusing,
and other sections do have examples that follow their descriptive text.
I think if the start of each example was made clear, the order could be
changed.  How about this?

..wayne..
-------------- next part --------------
--- rsync.yo	23 Jan 2004 01:36:59 -0000	1.140
+++ rsync.yo	23 Jan 2004 01:52:06 -0000
@@ -113,27 +113,36 @@ and a destination, one of which may be r
 
 Perhaps the best way to explain the syntax is with some examples:
 
+1. Transfer all files matching the pattern "*.c" from the current
+directory to the directory "src" on the machine "foo":
+
 quote(rsync *.c foo:src/)
 
-This would transfer all files matching the pattern *.c from the
-current directory to the directory src on the machine foo. If any of
+The "src" directory is relative to whatever default directory is set by
+the remote shell (typically $HOME for the current user).
+If any of
 the files already exist on the remote system then the rsync
 remote-update protocol is used to update the file by sending only the
-differences. See the tech report for details.
+differences. (See the tech report for details.)
+
+2. Recursively transfer all files from the directory "src/bar" on the
+machine "foo" into the "/data/tmp/bar" directory on the local machine:
 
 quote(rsync -avz foo:src/bar /data/tmp)
 
-This would recursively transfer all files from the directory src/bar on the
-machine foo into the /data/tmp/bar directory on the local machine. The
+The
 files are transferred in "archive" mode, which ensures that symbolic
-links, devices, attributes, permissions, ownerships etc are preserved
+links, devices, attributes, permissions, ownerships, etc. are preserved
 in the transfer.  Additionally, compression will be used to reduce the
 size of data portions of the transfer.
 
+3. Adding a trailing slash to the source of the previous example changes
+this behavior to avoid creating an additional directory level at the
+destination:
+
 quote(rsync -avz foo:src/bar/ /data/tmp)
 
-A trailing slash on the source changes this behavior to avoid creating an
-additional directory level at the destination.  You can think of a trailing
+You can think of a trailing
 / on a source as meaning "copy the contents of this directory" as opposed
 to "copy the directory by name", but in both cases the attributes of the
 containing directory are transferred to the containing directory on the
@@ -144,15 +153,18 @@ files in the same way, including their s
 quote(rsync -avz /src/foo /dest)
 quote(rsync -avz /src/foo/ /dest/foo)
 
-You can also use rsync in local-only mode, where both the source and
+4. 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.
+an improved copy command:
 
-quote(rsync somehost.mydomain.com::)
+quote(rsync -av /src/dir /dest)
+
+5. List all the anonymous rsync modules available on the host
+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.)
+quote(rsync somehost.mydomain.com::)
 
+See the following section for more details on this syntax.
 
 manpagesection(CONNECTING TO AN RSYNC SERVER)
 


More information about the rsync mailing list