Here is a tiny script that can be usefull to terminate (kill -9) all the programs which contain a certain string (i.e.: kill all the running copies of ping).

#!/bin/bash

for foo in `ps aux | grep $1 | awk '{print $2}'`;  do kill -9 $foo; done

Just run: matar <program name> and that’s it. They are all gone.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Slashdot
  • Technorati