美文网首页
scp 命令

scp 命令

作者: iseerain | 来源:发表于2019-11-16 20:49 被阅读0次
-v 和大多数 linux 命令中的 -v 意思一样,用来显示进度。可以用来查看连接、认证、或是配置错误。
-C 使能压缩选项
-P 设置端口
-r 复制目录
1、将本地文件传输到服务器
scp [local_file] [remote_username]@[remote_ip]:[remote_folder | remote_file]    // 需要输入密码

scp [local_file] [remote_ip]:[remote_folder | remote_file]     // 需要输入用户名和密码

scp /Users/mac_pc/Desktop/test.png root@192.168.1.1:/root
2、将本地目录传输到服务器
scp -r [local_folder] [remote_username]@[remote_ip]:[remote_folder]    // 需要输入密码

scp -r [local_folder] [remote_ip]:[remote_folder]     // 需要输入用户名和密码

sup -r /Users/mac_pc/Desktop/test root@192.168.1.1:/root
3、将服务器上的文件传输到本地
scp [remote_username]@[remote_ip]:[remote_file] [local_folder | local_file]

scp root@192.168.1.1:/data/wwwroot/default/111.png /Users/mac_pc/Desktop
4、将服务器上的目录传输到本地
scp -r [remote_username]@[remote_ip]:[remote_folder] [local_folder]

sup -r root@192.168.1.1:/data/wwwroot/default/test /Users/mac_pc/Desktop

相关文章

  • 【Linux 命令】scp 命令详解

    Linux 命令之 scp 命令详解 一、scp 简介 scp 命令用于不同主机之间复制文件和目录。scp 是 s...

  • scp命令

    Linux scp命令 Linux scp 命令用于 Linux 之间复制文件和目录。 scp 是 secure ...

  • Linux命令之文件管理 (五十)

    Linux scp命令Linux scp命令用于Linux之间复制文件和目录。 scp是 secure copy的...

  • Linux 其他常用命令

    SCP远程文件拷贝命令scp [可选参数] file_source file_target-1: 强制scp命令使...

  • Linux 常用命令

    ssh命令 远程登录 scp命令 scp是 secure copy的缩写, scp是linux系统下基于ssh登陆...

  • [Linux]SCP

    介绍 参数 -l 强制scp命令使用协议ssh1-2 强制scp命令使用协议ssh2-4 强制scp命令只使用ip...

  • Linux常用命令

    scp命令 scp是secure copy的简写,用于在Linux下进行远程拷贝文件的命令, scp传输是加密的,...

  • scp命令

    scp命令格式 scp [options] SRC... DEST/ 两种方式:scp [options] [us...

  • scp命令本地传输文件到linux服务器

    scp命令上传文件 举个栗子 scp命令上传整个文件夹 举个栗子 scp下载文件 举个栗子 权限不足? 但是,第一...

  • Windows和Linux文件互传-Putty

    scp scp命令用于在机器之间互传文件。命令:scp 本机文件的绝对路径 用户@远程机器IP:远程机器目录栗子...

网友评论

      本文标题:scp 命令

      本文链接:https://www.haomeiwen.com/subject/gacuictx.html