Monday, November 13, 2006

Kill by name!

This is an extremely useful command that I use all the time.
I assume everyone is familiar with the linux "kill" command.

For whatever reason, I had started 10 instances of a command named "xycommand". And, now I want to kill all the 10 instances.

If I wer using "kill", I would have to first do a "ps | grep xycommand" to identify the process ids, and kill each instance separely.

An efficient way of accomplishing the same is to use the "killall" command.

Thus,
$killall xycommand
kills off all the instances with the name xycommand.

No comments: