How to kill all processes matching a name?

后端 未结 11 1531
不思量自难忘°
不思量自难忘° 2020-11-29 14:53

Say I want to kill every process containing the word amarok. I can print out the commands I want to execute. But how do I actually make the shell execute them. ie.



        
11条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-29 15:16

    try kill -s 9 ps -ef |grep "Nov 11" |grep -v grep | awk '{print $2}' To kill processes of November 11 or kill -s 9 ps -ef |grep amarok|grep -v grep | awk '{print $2}' To kill processes that contain the word amarok

提交回复
热议问题