rsync

You use rsync in the same way you use rcp. You must  specify  a  source and a destination, one of which may be remote.

rsync -avz foo:src/bar /data/tmp

rsync -av /var/samba/ server:/opt/samba  # no compression
 

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 symbolic 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.

A trailing slash on the source changes this behavior , each of the following 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

You can use Grsync to add a graphical user interface.  It includes the option to show the rsync command line for the options you have selected.  For example:

rsync -r -t -p -o -g -v --progress -s /opt/ /run/user/media/opt

Subject