02 2013 档案

关闭进程的简单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 timelyxyz 阅读(320) 评论(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

统计

点击右上角即可分享
微信分享提示