problem with parent directories

tim.conway at tim.conway at
Thu Jan 24 02:36:00 EST 2002

     -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

          rsync foo/bar/foo.c remote:/tmp/

SunOS 5.7           Last change: 29 May 2001                    8

User Commands                                            rsync(1)

          then this would create a file called foo.c in /tmp/  on
          the remote machine. If instead you used

          rsync -R foo/bar/foo.c remote:/tmp/

          then a file called /tmp/foo/bar/foo.c would be  created
          on the remote machine. The full path name is preserved.

Tim Conway
tim.conway at
Philips Semiconductor - Longmont TC
1880 Industrial Circle, Suite D
Longmont, CO 80501
Available via SameTime Connect within Philips, n9hmg on AIM
perl -e 'print pack(nnnnnnnnnnnn, 
".\n" '
"There are some who call me.... Tim?"

Ben Turner <ben at>
Sent by: rsync-admin at
01/23/2002 03:26 AM

        To:     rsync at
        cc:     (bcc: Tim Conway/LMT/SC/PHILIPS)
        Subject:        problem with parent directories


i am having problems syncing directories. what i want to accomplish is the 
copying of a directory from a beta environment to a live environment. at 
the moment what i am doing is this:

/usr/local/bin/rsync -rtv --include '*/' --include 'dir/to/publish' 
--exclude '*' /web/beta/betawebsite user at webserver::web/livewebsite

unfortunately this takes ages, as rsync of course runs through the entire 
list of directories on the beta site. the problems that arise are that 
parent directories sometimes do not exist (in this example 'dir' might not 
exist), as they have not yet been published to the live environment, so i 
don't really see any other way of doing this?

can anybody nudge me into the right direction? :)



He who breaks a thing to find out what it is, has left the path of wisdom.

More information about the rsync mailing list