cool hit counter linux batch kill multiple processes kill_Intefrankly

linux batch kill multiple processes kill


(ps|grep python|awk '{print $1}')|xargs kill -9

The pipe character "|" Used to separate two commands, the output of the command to the left of the pipe character will be used as input to the command to the right of the pipe character. Here's a word about linking up with pipe characters

Several orders.

  "ps - ef" is the command to view all processes in Red Hat. The retrieved process will be used as input for the next command "grep LOCAL=NO". 

The output of "grep LOCAL=NO" is all processes that contain the keyword "LOCAL=NO", which is a common feature of remotely connected processes in Oracle databases.

"grep -v grep" removes processes containing the keyword "grep" from the list of processes.

"cut -c 9-15" intercepts the ninth to the fifteenth character of the input line, which happens to be the process number PID.

The xargs command in "xargs kill -9" is used to take the output of the previous command (PID) as an argument to the "kill -9" command and execute it.

      "kill -9" will forcibly kill the specified process, which will successfully remove all remote connection processes from oracle. For other similar tasks, just change the keyword part of "grep LOCAL=NO".

killall process name

   e.g. kill java related processes: killall java

Recommended>>
1、Understanding Deep Learning Convolution Parts Intuitively
2、Help me up I have to go to work
3、Digital factory with Software Defined Industrial Architecture
4、Building a very small blockchain in Python
5、Belarus President says digital economy will be developed vigorously

    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号