2.27linux和windows互传文件

前提:二者互传文件

  • 前提条件:要使用==xshell或者securecrt==才能用这个方法。
  • 前提条件:安装包==yum install -y lrzsz==

sz命令

sz——>从linux到windows上,会有两种状况linux

  1. 一.如果空的文件,会提示失败,但在桌面上仍然是传输成功的shell

    [root@hf-01 ~]# touch xin.txt
    [root@hf-01 ~]# sz xin.txt
    [root@hf-01 ~]# 
                            会提示传输失败,但桌面上市存在的
    [root@hf-01 ~]#
  2. 二.如果有内容的文件,会提示成功,也会在桌面上显示windows

    [root@hf-01 ~]# ls
    11.txt  234    33.txt  7767  amning111          ha.txt
    123     2.txt  6666    7777  anaconda-ks.cfg.1  hf
    [root@hf-01 ~]# sz ha.txt
    [root@hf-01 ~]# 
                        这里会提示传输成功,桌面上显示
    [root@hf-01 ~]#
  • 在桌面若已存在1.txt文件,再次传输的时候,会生成1(2).txt文件

rz命令

  • rz命令——>r表示remote
  • 将linux上文件传输到windows上
[root@hf-01 ~]# rz      敲完rz后,敲回车命令,会跳出上传的界面

[root@hf-01 ~]# 
[root@hf-01 ~]# ls
11.txt  234    33.txt  7767  9%E6%AD%A3%E5%88%99.pptx  anaconda-ks.cfg.1  hf
123     2.txt  6666    7777  
[root@hf-01 ~]#

总结

  • sz file(表示文件名) 就能够把linux上的文件传输到windows上
  • rz 加回车命令,就能够把windows上的命令上传到linux上
    • 文件传到当前目录下
相关文章
相关标签/搜索