随笔分类 -  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 石墨方 阅读(83) 评论(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 石墨方 阅读(338) 评论(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 石墨方 阅读(433) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示