linux 杀死进程 编程改变生活

pstree -ap|grep test333
kill
rm -f ~/h/mocache/*
nohup /home/runner/fftshell/payback.sh > /var/log/unicomclient/payback_04231034.log 2>&1 &
手工
===============
shell 脚本

ps aux|grep test333|grep -v grep |awk '{print $2}'|xargs kill -9
rm -f ~/h/mocache/*
rm -f ~/h/mtcache/*
nohup /home/runner/fftshell/payback.sh > /var/log/unicomclient/payback_$(date -d "today" +"%Y%m%d_%H%M%S").log 2>&1 &

肯定脚本的效率高。make下

posted @ 2011-04-26 00:42  crylxj  阅读(307)  评论(0编辑  收藏  举报