![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
系统技巧
jackauyure
这个作者很懒,什么都没留下…
展开
-
用Shell写的批量svnup小工具
[code="shell"] #!/bin/bash hl="datachart help job liansai live news odds soft zx kaijiang" host="500.com" for v in $hl do path="/home/www/html/$v.$host/html/" cd $path svn up done ...原创 2013-03-13 14:57:15 · 288 阅读 · 0 评论 -
定时取得进程内存并写入日志
[code="shell"] $ cat mem.sh #!/bin/bash LOGFILE="/xxx/mem.log" date +%Y-%m-%d" "%H:%M:%S >>$LOGFILE ps aux |grep 'bin/eas.py' |awk '{if($13~/^\w+$/){print $13,$4}}' >> $LOGFILE $ crontab -l ...原创 2013-03-14 12:06:08 · 117 阅读 · 0 评论 -
批量KILL进程
[code="shell"] ps aux| grep datafenxi| grep -v grep| awk '{print $2}'| xargs kill -9 [/code] ps aux 显示所有进程 grep datafenxi 查询含有datafenxi的进程 grep -v grep 去掉含有grep的进程 awk '{print $2}' 输出第二列,就是p...原创 2013-03-14 17:00:53 · 188 阅读 · 0 评论