DANGER
注意: 目录 为 -r
win10 本地复制文件到远程Linux
# system-monitor.jar 本地文件
# root@192.168.153.6:/usr/local/tmp/ 远程地址
#
scp system-monitor.jar root@192.168.153.6:/usr/local/tmp/
root@192.168.153.6 s password:
system-monitor.jar 100% 26MB 16.7MB/s 00:01
目录
到本地 -r
复制远程 # 目录 -r
D:\ASgcc2020\06\example\target>scp -r root@192.168.153.6:/home ./
root@192.168.153.6's password:
.bash_profile 100% 176 3.0KB/s 00:00
.bash_logout 100% 18 17.6KB/s 00:00
.bashrc 100% 124 121.3KB/s 00:00
D:\ASgcc2020\06\example\target>dir
目录
到当前服务器指定文件夹
Linux 复制远程 Linux--> Linux
[root@localhost omodel]# scp -r root@172.16.140.103:/app/aaaa/bbbb /app/omodel/
Please type 'yes' or 'no': yes
Warning: Permanently added '172.16.140.103' (ECDSA) to the list of known hosts.
root@172.16.140.103's password:
Linux复制当前目录到远程机器指定目录
scp -r /opt/soft/mongodb root@192.168.120.204:/opt/soft/scptest
从远处复制文件到本地目录
#命令:
scp root@192.168.120.204:/opt/soft/nginx-0.5.38.tar.gz /opt/soft/
上传本地文件到远程机器指定目录
scp /opt/soft/nginx-0.5.38.tar.gz root@192.168.120.204:/opt/soft/scptest
Linux -> Linux
scp run.sh 192.168.1.60:/app/