Skip to content

Instantly share code, notes, and snippets.

@stuartnelson3
Created January 21, 2014 16:17
Show Gist options
  • Save stuartnelson3/8543075 to your computer and use it in GitHub Desktop.
Save stuartnelson3/8543075 to your computer and use it in GitHub Desktop.
kill -9 everything
#!bin/bash
ps aux |
grep $1 |
ruby -ne 'print $_.split[1]+"\n"' |
xargs kill -9
@jphenow
Copy link

jphenow commented Jan 21, 2014

genocide

@pbyrne
Copy link

pbyrne commented Jan 21, 2014

Is this different than the existing killall command?

NAME
     killall -- kill processes by name

SYNOPSIS
     killall [-delmsvz] [-help] [-u user] [-t tty] [-c procname] [-SIGNAL] [procname ...]

DESCRIPTION
     The killall utility kills processes selected by name, as opposed to the selection by pid as done by kill(1).  By
     default, it will send a TERM signal to all processes with a real UID identical to the caller of killall that
     match the name procname.  The super-user is allowed to kill any process.

@stuartnelson3
Copy link
Author

LOL, there is a kill all command already?!?! god dammit. this is different because it uses kill -9, instead of just the regular kill which sends SIGTERM and allows process cleanup. This one sends SIGKILL and says DIE IN FIRE!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment