Sridhar Dhanapalan wrote:
On Sun, 10 Feb 2008, Jamie Wilkinson <[EMAIL PROTECTED]> wrote:
This one time, at band camp, Matthew Hannigan wrote:
Note for rsync newbs;
rsync -av /home.orig /home/
is different from
rsync -av /home.orig/ /home/
The first will do what you want, the
second will create /home/home.orig/
The other way around; ending with a trailing slash on both directories, as
you said the first time, will always make the second directory mirror the
first.
My understanding is that the presence of a trailing slash on the target
directory makes no difference.
C'mon guys. Idle speculation is no match for the man:
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 files are transferred in "archive" mode, which ensures that sym-
bolic 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.
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 / 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 contain-
ing directory on the destination. In other words, each of the follow-
ing commands copies the files in the same way, including their setting
of the attributes of /dest/foo:
rsync -av /src/foo /dest
rsync -av /src/foo/ /dest/foo
Looks like JW was correct.
cheers
rickw
--
_________________________________
Rick Welykochy || Praxis Services
Tis the dream of each programmer before his life is done,
To write three lines of APL and make the damn thing run.
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html