[K12OSN] rsync

Les Mikesell les at futuresource.com
Mon Oct 10 16:06:15 UTC 2005


On Mon, 2005-10-10 at 10:34, Sudev Barar wrote:

> rsync -avzP -e ssh ip_of_source:/home /
> 
> This will copy all (including sub-directories) from source to
> destination represented by the "/" If you are sitting at source then
> you need:
> rsync -avzP -e ssh /home ip_of_destination:/
> 
> man rsync for excellent information. Trailing "/" will not copy copy
> sub-directories.

A trailing slash on the source directory name means that it won't
create that name below the target path.  Copying subdirectories below
is controlled by the -a or -r options.   I think the path/ convention
is confusing so I always cd into the source directory and use '.'
as the source name and give the full path for the target.  It will
still create the last element of the path if it doesn't exist.

-- 
  Les Mikesell
    les at futuresource.com






More information about the K12OSN mailing list