7 thoughts on “通过ps、grep和kill批量杀死进程

  1. forenroll

    你这个用不了,而且ps aux 结果第二列不是进程号。
    请教其他命令,谢谢。

    Reply
      1. Anonymous

        因为你的命令会把grep这个命令进程也杀掉,有可能导致你要杀的进程杀的不干净。

        Reply
  2. forenroll

    搞错了,第二行是进程号。但是这个命令改成这样可能更好点。

    ps aux|grep qemu|grep -v grep|awk '{print $2}'|xargs kill -9

    Reply

Leave a Reply to coder4 Cancel reply

Your email address will not be published. Required fields are marked *