Created
April 21, 2015 17:54
-
-
Save LastZactionHero/9939d5fdfe7e711fa55d to your computer and use it in GitHub Desktop.
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
### THE SCRIPT | |
#!/usr/bin/env ruby | |
dump = `ps -ef | grep zeus` | |
processes = dump.split("\n") | |
processes.each do |process| | |
process_id = process.scan(/[0-9]+/)[1] | |
`sudo kill -9 #{process_id}` | |
end | |
### 1. Save this as: | |
# /usr/local/bin/kill_zeus | |
### 2. Set as executable | |
# chmod +x /usr/local/bin/kill_zeus |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment