Skip to content

Instantly share code, notes, and snippets.

@halferty
Created May 27, 2015 21:29
Show Gist options
  • Save halferty/73059819cbd5016f4a83 to your computer and use it in GitHub Desktop.
Save halferty/73059819cbd5016f4a83 to your computer and use it in GitHub Desktop.
The development world is full of badly-behaved processes that stop responding to ctrl-c (WEBrick & jetty, I'm lookin' at you!). Make them stop with a good old fashioned kill -9.
function killify() {
if [ $# -ne 0 ]; then
kill -9 `ps auxww | grep "$@" | grep -v grep | tr -s ' ' | cut -d' ' -f 2`
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment