关闭进程的简单shell
摘要:mac上的eclipse经常需要手动的去关闭java进程,略麻烦。在.bash_profile里写了段简单的shell,用端口号关闭进程,主要用的是lsof -ti:9001.之后$source .bash_Profile即可使用killps命令。killprocess() {pid=`lsof -n -i4TCP:9001 | grep LISTEN | awk '{print $2}'`if [ $pid ] then kill -9 $pid echo "pid=$pid, kill successfull!"else echo "No pr
阅读全文
posted @ 2013-02-01 17:12