Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Kill Process By It's Name

Status
Not open for further replies.

Michael42

Programmer
Oct 8, 2001
1,454
US
Hello,

I need to kill the mozilla-bin process from time to time while doing testing. My problem is I need to do it by it's name (mozilla-bin) rather than it's PID.

How can I to do this?

Thanks very much,

Michael42
 
Try something like:
ps -aux | grep "mozilla-bin" | awk ' {print $2}' | xargs kill -kill
 
Hi Michael,
try
pkill -9 mozilla-bin
Be carefull this command will kill all processes that contains mozilla-bin

 
Killall mozilla-bin will issue a kill and usually clean up processes.
 
you have to love how linux allows you so many ways of doing the same thing all with different powerful side features attached to them! :)

Gary Haran
==========================
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top