Answers for "how to kill a process in linux shell"

2

how to kill process in linux by name

######################################################
# How to Kill the supervisord process without the PID
######################################################
ps -ef | grep 'supervisord' | grep -v grep | awk '{print $2}' | xargs -r kill -9
Posted by: Guest on June-22-2021
0

kill process bash

this is to kill many process (mistakenly submitted) 

#!/bin/bash
while :
do
    echo "Press [CTRL+C] to stop.."
    for pid in $(ps -ef | awk '/pmemd.cuda/ {print $2}'); do kill -9 $pid; done  

    sleep 1
done
Posted by: Guest on September-24-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language