将本地代码拷贝到远程
scp file_name.txt [email protected]:\home\abc\
从远程拷贝代码到本地:
[root@hblinux32 home]# scp [email protected]:/home/Adtec/www/eccs/config/init.txt abc.txt
scp提供了几个选项 在scp后加就行了
-p 拷贝文件的时候保留源文件建立的时间。
扫描二维码关注公众号,回复:
420216 查看本文章
-q 执行文件拷贝时,不显示任何提示消息。
-r 拷贝整个目录 www.2cto.com
-v 拷贝文件时,显示提示信息。
[root@hblinux32 ~]# scp -r [email protected]:/home/Adtec/www/eccs/config/ config/