How to change permissions on a directory without meaning to... - include/exclude semantics

Wayne Davison wayned at
Wed Oct 8 06:06:52 EST 2003

On Tue, Oct 07, 2003 at 11:38:43AM -0700, jw schultz wrote:
> I'd say the paragraph needs an overhaul.

See how you like the appended patch.

-------------- next part --------------
--- rsync.yo	18 Aug 2003 23:52:43 -0000	1.127
+++ rsync.yo	7 Oct 2003 20:03:14 -0000
@@ -132,12 +132,17 @@
 quote(rsync -avz foo:src/bar/ /data/tmp)
-a trailing slash on the source changes this behavior to transfer
-all files from the directory src/bar on the machine foo into the
-/data/tmp/.  A trailing / on a source name means "copy the
-contents of this directory".  Without a trailing slash it means "copy
-the directory". This difference becomes particularly important when
-using the --delete option.
+a trailing slash on the source changes this behavior to avoid creating the
+extra directory level at the destination.  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
+destination.  In other words, each of the following commands copies the
+files in the same way, including their setting of the attributes of
+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
 destination don't have a ':' in the name. In this case it behaves like

More information about the rsync mailing list