zoukankan      html  css  js  c++  java
  • kill包含某关键字的所有进程

    批量杀死包含关键字“./amplxe-gui”的进程。

    命令:

    ps -ef | grep ./amplxe-gui | grep -v grep | cut -c 9-15 | xargs kill -9

    讲解


    "ps -ef" ——查看所有进程


    "grep ./amplxe-gui" ——列出所有含有关键字"./amplxe-gui"的进程


    "grep -v grep" ——在列出的进程中去除含有关键字"grep"的进程(因为我们在前一步生成的grep进程也包含关键字)


    "cut -c 9-15" ——截取输入行的第9个字符到第15个字符,而这正好是进程号PID


    "xargs kill -9" ——xargs 命令是用来把前面命令的输出结果(PID)作为"kill -9"命令的参数,并执行该命令。"kill -9"会强行杀掉指定进程。


    ————————————————
    原文链接:https://blog.csdn.net/bluecloudmatrix/java/article/details/36200079

  • 相关阅读:
    Bluedroid介绍
    Android蓝牙介绍
    Android Bluetooth抓包
    Bluetooth LMP介绍
    Bluetooth Baseband介绍
    Bluetooth SDP介绍
    Bluetooth HFP介绍
    Bluetooth RFCOMM介绍
    Bluetooth L2CAP介绍
    Windows开发
  • 原文地址:https://www.cnblogs.com/soymilk2019/p/12660092.html
Copyright © 2011-2022 走看看