Skip to content

Instantly share code, notes, and snippets.

@LastZactionHero
Created April 21, 2015 17:54
Show Gist options
  • Save LastZactionHero/9939d5fdfe7e711fa55d to your computer and use it in GitHub Desktop.
Save LastZactionHero/9939d5fdfe7e711fa55d to your computer and use it in GitHub Desktop.
### 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