linux 根据端口kill掉进程

#杀掉8080端口的进程tomcat

netstat -nlp |grep :8080 |grep -v grep|awk '{print $7}' |awk -F '/' '{print $1}' |xargs kill -9进程

#查询包含tomcat的进程号awk

ps -ef|grep tomcat|grep -v grep|awk '{print $2}'grep

#杀掉全部包含‘tomcat’的进程查询

ps -ef|grep tomcat|grep -v grep|awk '{print $2}' |xargs kill -9 
 端口

相关文章
相关标签/搜索