Created
January 21, 2014 16:17
-
-
Save stuartnelson3/8543075 to your computer and use it in GitHub Desktop.
kill -9 everything
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bin/bash | |
ps aux | | |
grep $1 | | |
ruby -ne 'print $_.split[1]+"\n"' | | |
xargs kill -9 |
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.
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
genocide