[Cialug] SOT: rsync newbie
Don Ellis
don.ellis at gmail.com
Mon May 2 17:04:05 CDT 2011
The man page is helpful:
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
--Don Ellis
On Mon, May 2, 2011 at 4:58 PM, Nathan C. Smith <nathan.smith at ipmvs.com> wrote:
> I want to use rsync to copy files from dirone to dirtwo on the same machine. Many of the files already exist in the folder and I just want to make sure they are all there and up-to-date.
>
> The command I am using looks like this:
> # rsync --progress --partial --size-only -av /mnt/dirone /dirtwo
>
> But what I am getting is a /dirtwo/dirone full of files. How do I specify just the files and not the whole folder? Using a trailing slash? /
>
> -Nate
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
>
More information about the Cialug
mailing list