命令:ps -aux | grep shelltest/test.js | grep -v grep
筛选出符合条件的进程

运行命令:ps -aux | grep shelltest/test.js | grep -v grep | awk '{print $2}' | xargs kill -9
结束进程

命令:ps -aux | grep shelltest/test.js | grep -v grep
筛选出符合条件的进程
运行命令:ps -aux | grep shelltest/test.js | grep -v grep | awk '{print $2}' | xargs kill -9
结束进程
本文标题:Linux 下批量结束一批进程
本文链接:https://www.haomeiwen.com/subject/emeduftx.html
网友评论