随笔分类 -  linux

expect简单使用案例
摘要:举例:自动从另一个机器B中获取文件 shell脚本中调用expect脚本(传递所需要的机器B中的文件路径) filename=$1 ./t1.exp "/data/$filename" 给t1.exp赋权 chmod 755 t1.exp expect 脚本 #!/usr/bin/expect se 阅读全文

posted @ 2021-01-19 16:23 石墨方 阅读(91) 评论(0) 推荐(0)

bash中执行SQL语句返回一个值
摘要:mysql --defaults-extra-file=/data/my.password --batch -N -h127.0.0.1 -Ddb1 -e"select uname from t1 where id =12;" --defaults-extra-file指定数据库连接的用户 my.p 阅读全文

posted @ 2020-10-28 14:23 石墨方 阅读(344) 评论(0) 推荐(0)

对机器特定端口增加网络延迟
摘要:参考于https://blog.csdn.net/scdxmoe/article/details/78532425?utm_source=blogxgwz8 例如:对本地网卡上30001 端口延迟5秒 tc qdisc add dev lo root handle 1: prio bands 4tc 阅读全文

posted @ 2020-10-26 14:51 石墨方 阅读(471) 评论(0) 推荐(0)

导航