expect脚本同步文件、expect脚本指定host和要同步的文件、构建文件分发系统、批量远程执行命令
                            
                            
                                分类:
其他好文   时间:
2018-08-01 00:22:45   
                                阅读次数:
177
                             
                         
                    
                        
                            
                            
                                一、expect脚本同步文件实例4:自动同步文件[root@linux-01sbin]#vi4.expect#!/usr/bin/expectsetpasswd"123456"spawnrsync-avroot@192.168.238.130:/tmp/12.txt/tmp/expect{"yes/no"{send"yes\r"}&quo
                            
                            
                                分类:
其他好文   时间:
2018-07-23 10:57:09   
                                阅读次数:
182
                             
                         
                    
                        
                            
                            
                                expect脚本同步文件在一台机器上把文件同步到多台机器上自动同步文件[root@akuilinux01sbin]#vim4.expect#!/usr/bin/expectsetpasswd"s5381561"spawnrsync-avroot@192.168.21.129:/tmp/12.txt/tmp/expect{"yes/no"{send"yes\r"}"password:"{send"$
                            
                            
                                分类:
其他好文   时间:
2018-07-23 00:07:27   
                                阅读次数:
211
                             
                         
                    
                        
                            
                            
                                20.31 expect脚本同步文件20.32 expect脚本指定host和要同步的文件20.33 构建文件分发系统20.34 批量远程执行命令20.31 expect脚本同步文件指定host和要同步的文件#!/usr/bin/expectset passwd "123456"set host [lindex $argv 0]set file [lindex $argv 1]
                            
                            
                                分类:
其他好文   时间:
2018-07-21 21:27:12   
                                阅读次数:
152
                             
                         
                    
                        
                            
                            
                                expect脚本同步文件自动同步文件#!/usr/bin/expectsetpasswd"目标机器密码"spawnrsync-avroot@目标机器ip:/tmp/12.txt/tmp/expect{"yes/no"{send"yes\r"}"password:"{send"$passwd\r"}}
                            
                            
                                分类:
其他好文   时间:
2018-06-08 00:42:56   
                                阅读次数:
158
                             
                         
                    
                        
                            
                            
                                20.31 expect脚本同步文件;20.32 expect脚本指定host和要同步的文件;20.33 构建文件分发系统;20.34 批量远程执行命令20.31 expect脚本同步文件自动同步文件1. 同步远程机器hao2上/tmp/12.txt文件 到本机/tmp/下 :[root@hao-01 ~]# vim 4.expect添加内容:#!/usr/bin/expectset passwd
                            
                            
                                分类:
其他好文   时间:
2018-05-03 14:22:20   
                                阅读次数:
151
                             
                         
                    
                        
                            
                            
                                    自动同步文件 指定host和要同步的文件 需求背景对于大公司而言,肯定时不时会有网站或者配置文件更新,而且使用的机器肯定也是好多台,少则几台,多则几十甚至上百台。所以,自动同步文件是至关重要的。 实现思路首先要有一台模板机器,把要分发的文件准备好,然后只要使用expect脚本批量把需要同步的文件分发 ...
                            
                            
                                分类:
其他好文   时间:
2018-04-30 00:03:07   
                                阅读次数:
196
                             
                         
                    
                        
                            
                            
                                20.31expect脚本同步文件#!/usr/bin/expectsetpasswd"liang.123"spawnrsync-avroot@192.168.137.130:/tmp/12.txt/tmp/将远程的/tmp/12.txt同步到本地的机器上expect{"yes/no"{send"yes\r"}第一次会提示yes或no&q
                            
                            
                                分类:
其他好文   时间:
2018-04-26 23:39:30   
                                阅读次数:
329
                             
                         
                    
                        
                            
                            
                                20.31 expect脚本同步文件 20.32 expect脚本指定host和要同步的文件 20.
                            
                            
                                分类:
其他好文   时间:
2018-04-26 21:46:03   
                                阅读次数:
144
                             
                         
                    
                        
                            
                            
                                十八周二次课(4月26日)20.31 expect脚本同步文件20.32 expect脚本指定host和要同步的文件20.33 构建文件分发系统20.34 批量远程执行命令20.31 expect脚本同步文件自动同步文件 编辑脚本文件:vi 4.expect#!/usr/bin/expectset passwd "123456"spawn rsync -av root@192.
                            
                            
                                分类:
其他好文   时间:
2018-04-26 17:00:32   
                                阅读次数:
205