Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

how to kill looped process by command name

#!/bin/bash
while :
do
    echo "Press [CTRL+C] to stop.."
    for pid in $(ps -ef | awk '/your_process_name/ {print $2}'); do kill -9 $pid; done  
    							^keep / /	
    sleep 1
done
 
PREVIOUS NEXT
Tagged: #kill #looped #process #command
ADD COMMENT
Topic
Name
2+6 =