linux之scp跨主机文件拷贝

本文介绍了Linux scp命令的使用,包括从本地到远程以及从远程到本地的文件和目录拷贝。通过示例详细展示了scp命令的语法和常用参数,如-v(显示进度)、-C(启用压缩)、-P(选择端口)等,帮助用户在不同Linux主机间安全地传输文件。
摘要由CSDN通过智能技术生成

Linux scp命令用于Linux之间复制文件和目录

scp [可选参数] file_source file_target

1)本地到远程

         A)文件

         scp local_file remote_username@remote_host:remote_file  

         scp local_fle  remote_host:remote_file

         [root@localhost ~]# scp ./sh/corn.sh weizong@192.168.0.251:/home/weizong/
weizong@192.168.0.251's password:
corn.sh                                                                                                                                        100%  480     0.5KB/s   00:00   

         B)目录

         scp -rv local_dir remote_username@remote_host:remote_dir

         scp -rv local_dir remote_host:remote_dir

        

scp -rv /var/develop/ weizong@192.168.0.251:/home/weizong/
Executing: program /usr/bin/ss

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值