原文来源: https://www.tecmint.com/scp-commands-examples/

  • 基本语法
scp source_file_name username@destination_host:destination_folder
  • 查看传输详情 -v
pungki@mint ~/Documents $ scp -v Label.pdf mrarianto@202.x.x.x:.
  • 提供原始文件的修改时间,访问时间和模式
pungki@mint ~/Documents $ scp -p Label.pdf mrarianto@202.x.x.x:.
  • 让文件传输的更快 -C
pungki@mint ~/Documents $ scp -Cpv messages.log mrarianto@202.x.x.x:.
  • 选择另一种加密方式加密文件 -c

    默认使用3des加密,可以使用 -c 指定加密方式
pungki@mint ~/Documents $ scp -c 3des Label.pdf mrarianto@202.x.x.x:.

mrarianto@202.x.x.x's password:
Label.pdf 100% 3672KB 282.5KB/s 00:13
  • 限制带宽使用
pungki@mint ~/Documents $ scp -l 400 Label.pdf mrarianto@202.x.x.x:.

mrarianto@202.x.x.x's password:
Label.pdf 100% 3672KB 50.3KB/s 01:13
  • 制定SCP使用具体的端口 -P
pungki@mint ~/Documents $ scp -P 2249 Label.pdf mrarianto@202.x.x.x:.

mrarianto@202.x.x.x's password:
Label.pdf 100% 3672KB 262.3KB/s 00:14
  • 递归拷贝文件夹下的文件 -r
pungki@mint ~/Documents $ scp -r documents mrarianto@202.x.x.x:.

mrarianto@202.x.x.x's password:
Label.pdf 100% 3672KB 282.5KB/s 00:13
scp.txt 100% 10KB 9.8KB/s 00:00
  • 禁用进度表和警告/诊断消息 -q
pungki@mint ~/Documents $ scp -q Label.pdf mrarianto@202.x.x.x:.

mrarianto@202.x.x.x's password:
pungki@mint ~/Documents $
  • 通过代理使用SCP复制文件(略)

  • 指定自己想要的config文件 -F

pungki@mint ~/Documents $ scp -F /home/pungki/proxy_ssh_config Label.pdf

mrarianto@202.x.x.x:.
mrarianto@202.x.x.x's password:
Label.pdf 100% 3672KB 282.5KB/s 00:13

[译]10个有关SCP的命令的更多相关文章

  1. 转: windows 10使用原生linux bash命令行

    转: https://www.zybuluo.com/pandait/note/337430 windows 10使用原生linux bash命令行 linux bash windows-10 第一时 ...

  2. 用scp这个命令来通过ssh传输文件

    小结: 1. upload files 到 ssh 服务器 localhost $ scp localfile root@172.20.34.**:~/remotepath 2. 从 ssh 服务器d ...

  3. 在linux下一般用scp这个命令来通过ssh传输文件

    在linux下一般用scp这个命令来通过ssh传输文件. 1.从服务器上下载文件scp username@servername:/path/filename /var/www/local_dir(本地 ...

  4. 10个常用的ps命令总结,参数

    Linux系统中10个常用的ps命令总结 PS 命令是什么 查看它的man手册可以看到,ps命令能够给出当前系统中进程的快照.它能捕获系统在某一事件的进程状态.如果你想不断更新查看的这个状态,可以使用 ...

  5. scp相关命令总结

    scp 跨机远程拷贝scp是secure copy的简写,用于在Linux下进行远程拷贝文件的命令,和它类似的命令有cp,不过cp只是在本机进行拷贝不能跨服务器,而且scp传输是加密的.当你服务器硬盘 ...

  6. 10 条有趣的 Linux 命令

    在终端工作是一件很有趣的事情.今天,我们将会列举一些有趣得为你带来欢笑的Linux命令. 1. rev 创建一个文件,在文件里面输入几个单词,rev命令会将你写的东西反转输出到控制台. # rev & ...

  7. 使用SCP在命令行传输文件

    下载远程服务器上的文件 scp   root@10.0.10.10:/home/user/download.txt  ./download.txt 上传文件到远程服务器 scp  ./upload.t ...

  8. 永远不要在Linux 执行的 10 个最危险的命令

    转: http://www.tecmint.com/10-most-dangerous-commands-you-should-never-execute-on-linux/ http://www.l ...

  9. Linux下的scp拷贝命令详解

    相同Linux系统中对文件复制拷贝可以用CP命令: cp [options] source dest cp [options] source... directory 说明:将一个档案拷贝至另一档案, ...

随机推荐

  1. react-native环境配置入坑指南.

    官方入门教程:https://reactnative.cn/docs/0.51/getting-started.html http://services.gradle.org/distribution ...

  2. 书籍《深入理解Spring Cloud 与微服务构建》勘误、源码下载

    转载请标明出处: https://blog.csdn.net/forezp/article/details/79638403 本文出自方志朋的博客 文章勘误 错误在所难免,欢迎大家批评指正,在文章下方 ...

  3. 一个logstash引发的连环案,关于logstash提示:Reached open files limit: 4095, set by the 'max_open_files' option or default, files yet to open: 375248

    不多说,直接上问题.版本logstash-2.4.0,启动后提示错误: !!! Please upgrade your java version, the current version '1.7.0 ...

  4. js中判断数组中是否包含某元素的方法

    方法一:array.indexOf(item,start):元素在数组中的位置,如果没与搜索到则返回 -1. 参数 描述 item 必须.查找的元素. start 可选的整数参数.规定在数组中开始检索 ...

  5. 【2018 ICPC焦作网络赛 K】Transport Ship(多重背包二进制优化)

    There are N different kinds of transport ships on the port. The ith kind of ship can carry the weigh ...

  6. ABAP术语-Implementation

    Implementation 原文:http://www.cnblogs.com/qiangsheng/archive/2008/02/22/1077076.html The concrete cod ...

  7. bootstrap模态框传值操作

    1.bootstrap模态框之html代码 <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"& ...

  8. vs2017升级、安装

    图解VS 2017升级并安装.NET Core 2.1 SDK https://jingyan.baidu.com/album/ff42efa9fb5816c19e2202ef.html?picind ...

  9. Java : java基础(4) 线程

    java开启多线程的方式,第一种是新建一个Thread的子类,然后重写它的run()方法就可以,调用类的对象的start()方法,jvm就会新开一个线程执行run()方法. 第二种是类实现Runabl ...

  10. MongoDB学习(1)--安装,基本curd操作

    知识点: 1-MongoDB 安装,启动和卸载 2-基本概念 3-基本的增删改查操作(CURD) 来回顾总结一把学习的mongodb,如果有javascript基础,学习"芒果DB" ...