使用awk,grep,杀死所有僵尸进程!

・1 分钟阅读

杀死所有僵尸进程(保证行)!

kill -9 `ps -xaw -o state -o ppid | grep Z | grep -v PID | awk '{print $2}'`
它识别僵尸进程的父进程,并且杀死它们,
示例输出
No output. But if you want to see the PIDs of your Zombies' parents just use this piece:
ps -xaw -o state -o ppid | grep Z | grep -v PID | awk '{print $2}
Hujiuxiang profile image