zoukankan      html  css  js  c++  java
  • linux命令——scp

    scp linux系统之间基于ssh登录的安全copy文件或者目录。

    本地[local]—— 远程[remote]{文件}
    scp local_file remote_username@remote_ip:remote_folder 
    scp local_file remote_username@remote_ip:remote_file
    scp local_file remote_ip:remote_folder
    scp local_file remote_ip:remote_file

    说明:

    1. 将本地文件[local_file]拷贝到远程主机[remote_ip]用户[remote_username]的目录[remote_folder]下,需要输入远程主机的密码
    2. 将本地文件[local_file]拷贝到远程主机[remote_ip]用户[remote_username]的下,重命名为remote_file,需要输入远程主机的密码
    3. 将本地文件[local_file]拷贝到远程主机[remote_ip]的目录[remote_folder]下,需要输入远程主机的用户名密码
    4. 将本地文件[local_file]拷贝到远程主机[remote_ip]下,并重命名为remote_file,需要输入远程主机的用户名密码
    本地[local]—— 远程[remote]{目录}
    scp -r local_folder remote_username@remote_ip:remote_folder 
    scp -r local_folder remote_ip:remote_folder
    远程[remote]—— 本地[local]
    scp remote_username@remote_ip:remote_file local_username@local_ip:local_folder
    注:[local_username@local_ip:]可以不输入
    [options]
    -P port:走指定端口。比如绕过远程防火墙限制等
    -p:保留原文件属性,比如修改次数,访问次数和模式等
    -r:递归
    -v:详情模式。显示进度,打印debug信息,比如连接、认证、配置错误信息等
    -q:静默模式。
  • 相关阅读:
    c copy
    IfcVertexLoop
    qt windeployqt 日志
    IfcPolyLoop
    IfcEdgeLoop
    IfcLoop
    QTableWidget
    QList删除元素
    matlab X的负次方函数绘制2
    matlab X的负次方函数绘制1
  • 原文地址:https://www.cnblogs.com/andr01la/p/5621910.html
Copyright © 2011-2022 走看看