Skip to content

Instantly share code, notes, and snippets.

@bindiego
Last active August 29, 2015 14:07
Show Gist options
  • Save bindiego/8b9a437e6a1b7dca4262 to your computer and use it in GitHub Desktop.
Save bindiego/8b9a437e6a1b7dca4262 to your computer and use it in GitHub Desktop.
Kill zombies
#!/bin/sh -ex
# find zombie pid
# ps aux | awk '{ print $8 " " $2 }' | grep -w Z
# kill -9 PID
# All in one cmd does all
kill -HUP `ps -A -ostat,ppid | grep -e '^[Zz]' | awk '{print $2}'`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment