使用scp+tar命令组合,帮多个零散文件进行Linux服务对拷

server1$ tar -zc ./path | ssh root@server2 "tar -zx -C /data/path"


假设帮server1上面的 ./path目录拷贝到 server2的 /data/path目录下面去。

参考资料:

https://serverfault.com/questions/208300/quickest-way-to-transfer-55gb-of-images-to-new-server