且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

远程Linux服务器到远程Linux服务器dir复制.如何?

更新时间:2023-02-02 17:41:55

我通常有两种方法,都使用ssh:

There are two ways I usually do this, both use ssh:

scp -r sourcedir/ user@dest.com:/dest/dir/

或者,更健壮和更快(就传输速度而言)的方法:

or, the more robust and faster (in terms of transfer speed) method:

rsync -auv -e ssh --progress sourcedir/ user@dest.com:/dest/dir/

如果要了解有关每个命令如何工作的更多详细信息,请阅读手册页.

Read the man pages for each command if you want more details about how they work.