Are the two commands below interchangeable? Does it matter whether I use the .
or not?
sudo rsync -aXS /home/ /media/home/
sudo rsync -aXS /home/. /media/home/.
I know that the period .
means the following in the rsync
context:
.
refers to the current directory
..
refers to the parent directory
One usage of
.
in rsync is to limit the amount of path information that is sent as implied directories for each path you specify.creates
file
in/target
while:would creates
/src/path/to/dir/file
in/target
.The other usage is when you are using
rsync
with-d
option:will copy the
boot
into/target
while:rsync -d /boot/ /target
or:rsync -d /boot/. /target
would copy the contents of/boot
into/target
.As I can see, it your situation it doesn't make any differences.
rsync documentation