我有directory(/usr/share/hub-bucket/GameImages/
),其中的子目录包含文件。我想将子目录转移到machine到location /usr/share/hub-bucket/GameImages/
。两者都是远程计算机,我可以使用SSH私钥和密码访问远程目标。将来,我将需要同步远程源和远程目标文件夹/文件。如何实施?我使用SCP进行文件传输,但没有使用过文件夹/子文件夹。
如果使用scp,则可以使用-r选项,例如
scp -r /usr/share/hub-bucket/GameImages/ user@remote-host:/usr/share/hub-bucket/GameImages/
您也可以使用rsync命令
rsync -avz /usr/share/hub-bucket/GameImages/ user@remote-host:/usr/share/hub-bucket/GameImages/
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句