随笔分类 -  shell

快捷脚本
记一次centos 服务器中毒事件
摘要:云平台反应路由器流量异常,已经被强制关闭。这导致系统出现了很大了故障,路由器下面几十个集群,几百台机器,不知道哪台机器出了问题,不能定位,真心纠结。一台台在控制台上看流量图,最终定位到一台elasticsearch服务器异常。登录上去,查看。tmp目录下有好多不知名文件。。。 [root@ind... 阅读全文
posted @ 2015-05-11 10:33 Buttonwood 阅读(1413) 评论(0) 推荐(1)
Vim 用法
只有注册用户登录后才能阅读该文。
posted @ 2012-06-02 19:51 Buttonwood 阅读(5) 评论(0) 推荐(0)
awk 简单用法小结
摘要:1a. choose rows where column 3 is larger than column 5:awk '$3>$5' input.txt > output.txt1b. calculate the sum of column 2 and 3 and put it at the end of a row:awk '{print $0,$2+$3}' input.txtor replace the first column:awk '{$1=$2+$3;print}' input.txt2. show rows betwe 阅读全文
posted @ 2012-05-21 20:57 Buttonwood 阅读(286) 评论(0) 推荐(0)