SSH服务及其扩展(sshpass和expect) Linux SSH服务一共包含三个工具:ssh、scp、sftp [远程连接及执行命令] 语法:ssh -p端口 账号@IP 命令 参数说明:-o StrictHostKeyChecking=no //取消提示 -p 端口 ² 示例: ssh -p ...
分类:
其他好文 时间:
2018-03-04 23:59:03
阅读次数:
1159
当系统区内存不能再申请新进程的时候申请会失败 在512MB内存下最多分配的子进程数 3331 [root@localhost 05] ./test5 1 50000 expect 50000 sub process [root@localhost 05] 1000 sub process attri ...
分类:
系统相关 时间:
2018-03-04 01:11:43
阅读次数:
258
try跟expect:当开始一个try语句后,python就在当前程序的上下文中作标记,这样当异常出现时就可以回到这里,try子句先执行,接下来会发生什么依赖于执行时是否出现异常。 ...
分类:
其他好文 时间:
2018-03-04 01:06:43
阅读次数:
118
1 /* 2 * 模拟 CAS 算法 3 */ 4 public class TestCompareAndSwap { 5 6 public static void main(String[] args) { 7 final CompareAndSwap cas = new CompareAndSw... ...
分类:
编程语言 时间:
2018-03-03 18:23:13
阅读次数:
191
http://blog.csdn.net/wandershi/article/details/75088310 1.创建Profiles文件 2.添加配置文件到iTerm2 iTerm2->Preferences->profile-> name: 172.16.1.1 Command->expect ...
分类:
其他好文 时间:
2018-03-02 18:42:49
阅读次数:
3251
expect脚本同步文件[root@centos7-3shell]#vi1.expect#!/usr/bin/expectsetpasswd"123456"spawnrsync-avroot@192.168.1.83:/tmp/12.txt/tmp/expect{"yes/no"{send"yes\r"}"password:"{send"$passwd\r"}}expecteof[root@cen
分类:
其他好文 时间:
2018-03-01 11:46:17
阅读次数:
126
exp_test.sh文件 执行:expect exp_test.sh ...
分类:
系统相关 时间:
2018-03-01 10:16:06
阅读次数:
174
20.27分发系统介绍应用场景当业务越做越大,服务器需求越来越多,几台服务器的话还好一点;当十几、几十台的时候,工作量就非常大!并且不规范,需要一个模板机分发到各个机器上去。可以用开源的软件,expect脚本语言,进行实现分发系统的功能。20.28expect脚本远程登录yuminstall-yexpect自动远程登录,并执行命令#!/usr/bin/expectsethost"192.168.2
分类:
其他好文 时间:
2018-02-28 11:17:47
阅读次数:
194
expect脚本同步文件1.自动同步文件[root@garytao-01shell]#vi4.expect增加如下脚本内容:#!/usr/bin/expectsetpasswd"123456"spawnrsync-avroot@172.16.111.110:/tmp/12.txt/tmp/expect{"yes/no"{send"yes\r"}"password:"{send"$passwd\r"
分类:
其他好文 时间:
2018-02-27 17:43:49
阅读次数:
202
F Yes or No Time limit : 2sec / Memory limit : 256MB Score : 2000 points Problem Statement You are participating in a quiz with N + M questions and Ye ...
分类:
其他好文 时间:
2018-02-27 17:43:42
阅读次数:
178