Wednesday, June 17, 2015

Kill Multiple Instances of a running process in single linux command

Day to day activity of a developer involved to work with deployment machine . Therefore its good to know basic commands .

Find process id's and kill them with single command :

Suppose , one need to find out process id of running tomcat and kill those process .

 for pid in $(ps -ef | grep apache-tomcat-7.0.50 | awk '{print $2}'); do kill -9 $pid; done

No comments:

Post a Comment