yinhaiping

Linux<=>window

yum install lrzsz

sz:将选定的文件发送(send)到本地机器
rz:运行该命令会弹出一个文件选择窗口,从本地选择文件上传到服务器(receive)

Linux<=>Linux

1.文件复制:本机->远程服务器

scp /home/root/test1.txt root@192.168.33.100:/home/test2.txt

其中,test1为源文件,test2为目标文件,root@192.168.33.100为远程服务器的用户名和ip地址

2.文件复制:远程服务器->本机

scp root@172.16.18.2:/home/test2.txt /home/root/test1.txt

其中,root@172.16.18.2为远程服务器的用户名和ip地址, test2为源文件,test1为目标路径

3.文件夹复制

scp -r root@192.168.33.100:/home/ /home/

4. 端口号

如果端口号有更改,需在scp 后输入:-P 端口号 (注意是大写,ssh的命令中 -p是小写)

分类:

技术点:

相关文章:

  • 2021-11-23
  • 2022-12-23
  • 2021-12-03
  • 2021-08-09
  • 2021-09-14
  • 2021-10-04
猜你喜欢
  • 2021-08-31
  • 2022-02-08
  • 2021-04-05
  • 2021-11-23
  • 2022-02-09
  • 2021-12-13
相关资源
相似解决方案