Linux服务器对拷文件搬家利器-SCP命令
背景说明
Linux scp命令用于Linux之间复制文件和目录。
scp是secure copy的缩写,scp是Linux系统下基于ssh登陆进行安全的远程文件拷贝命令。
从本地复制到远程
# 拷贝文件
scp /home/test/test.txt root@192.168.0.2:/home/test/
# 拷贝目录
scp -r /home/test/ root@192.168.0.2:/home/test/
从远程复制到本地
# 拷贝文件
scp root@192.168.0.2:/home/test/ /home/test/test.txt
# 拷贝目录
scp -r root@192.168.0.2:/home/test/ /home/test/
小结
结合screen【服务器】Linux会话服务Screen教程 来进行挂机远程复制,服务器与服务器对拷,确实堪称搬家利器。
版权声明:本文为原创文章,版权归 本站 所有,未经许可,不得转载。
本文地址:https://www.yiisu.vip/linux_scp.html
如对本文有疑问可在评论区留言,博主会尽力解答,同时欢迎关注微信公众号“云计算课代表”。