|
如果你使用了非标准端口,确保像下面 scp 命令那样指定好了端口号。
# file-copy-scp.sh-
#!/bin/shfor server in `more server-list.txt`doscp -P 2222 -r $1 root@2g.CentOS.com$server:/opt/backupdone
运行脚本,输入文件名。
# ./file-copy.sh ovh.sh-
ovh.sh 100% 3558 3.5KB/s 00:00ovh.sh 100% 3558 3.5KB/s 00:00
如果你使用了非标准端口,确保像下面 rsync 命令那样指定好了端口号。
# file-copy-rsync.sh-
#!/bin/shfor server in `more server-list.txt`dorsync -avzhe 'ssh -p 2222' $1 root@2g.CentOS.com$server:/opt/backupdone
运行脚本,输入文件名。
# ./file-copy-rsync.sh passwd-up.shsending incremental file listpasswd-up.sh-
sent 238 bytes received 35 bytes 26.00 bytes/sectotal size is 159 speedup is 0.58-
sending incremental file listpasswd-up.sh-
sent 238 bytes received 35 bytes 26.00 bytes/sectotal size is 159 speedup is 0.58
【编辑推荐】
- PowerTOP:在Linux上监视电量使用和改善笔记本电池寿命
- 你的Linux系统上安装了多少内存?又使用了多少?
- 详解Linux 磁盘I/O优化(Oracle RAC)
- 2019年值得推荐的五大Linux发行版
- 杀死僵尸进程,你需要这些神奇高效的Linux命令行
【责任编辑:庞桂玉 TEL:(010)68476606】
点赞 0 (编辑:92站长网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|