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

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

image.png
命令:ps -aux | grep shelltest/test.js | grep -v grep 筛选出符合条件的进程
运行命令:ps -aux | grep shelltest/test.js | grep -v grep | awk '{print $2}' | xargs kill -9结束进程