Use rsync
. A partir da sua página de mana:
rsync -avz foo:src/bar /data/tmp
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 sym‐
bolic 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.
Para o que vale, du
pode seguir links simbólicos ou não:
-L, --dereference
dereference all symbolic links
-P, --no-dereference
don't follow any symbolic links (this is the default)