Quote:
Originally Posted by alaios
Thanks and
what happens when trailing / is missing?
as
rsync -aviS /path/to/source /path/to/destination
|
Why don't you try it and see? Make two dummy directories, try various combinations of trailing slashes, and see what happens.
IIRC:
rsync -a /path/to/source /path/to/dest
will copy the folder source into dest (so you'll now have /path/to/dest/source)
rsync -a /path/to/source/ /path/to/dest
will copy the contents of source into dest
rsync -a /path/to/source /path/to/dest/
will copy the folder source into dest (so you'll now have /path/to/dest/source)
rsync -a /path/to/source/ /path/to/dest/
will copy the contents of source into dest
So basically, the only trailing slash that matters is the one on the source directory. That tells rsync whether it should copy the source folder itself into dest, or the contents of source into dest.
But, the only way to know for sure is to try it and see what happens.