zoukankan      html  css  js  c++  java
  • SCP远程拷贝命令

    利用scp指令可以在linux机器间传递文件,个人使用几次感觉效率还是较高的,比SFTP+本地做媒介要高得多。

    1.本地拷贝到远程

    这种方式的命令模式是scp local_file remote_username@remote_ip:remote_file

    示例如下:

    [root@msg45 hy]# ls
    rpm  test.txt  wasliberty

    将test.txt从本地拷贝到远程
    [root@msg45 hy]# scp test.txt root@msg43.matson.ufo.com:/home/hy/
    The authenticity of host 'msg43.matson.ufo.com (91.200.193.93)' can't be established.
    RSA key fingerprint is dc:ab:dc:c8:09:6d:c7:fe:b5:f6:b8:9a:93:89:75:07.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added 'msg43.matson.ufo.com,91.200.193.93' (RSA) to the list of known hosts.
    root@msg43.matson.ufo.com's password:
    test.txt                                                                                                                                       100%   15     0.0KB/s   00:00    
    [root@msg45 hy]#

    2.远程拷贝到本地

    从 远程 复制到 本地,只要将 从 本地 复制到 远程 的命令 的 后2个参数 调换顺序 即可,如下。

    scp  remote_username@remote_ip:remote_file local_file

    示例如下:

    [root@msg45 hy]# scp root@msg43.matson.ufo.com:/home/hy/test.txt  test1.txt
    root@msg43.matson.ufo.com's password:
    test.txt                                                                                                                                       100%   15     0.0KB/s   00:00    
    [root@msg45 hy]#

  • 相关阅读:
    vue自定义指令directive
    vue组件:input数字输入框
    vue中用数组语法绑定class
    vue中检测数组改变
    node绝对和相对模块
    判断拖放
    媒体查询 和rem布局
    JSON字符串对象相互转换
    深度封装typeof判断
    类数组
  • 原文地址:https://www.cnblogs.com/heyang78/p/3524157.html
Copyright © 2011-2022 走看看