Created
November 18, 2015 18:47
-
-
Save bitle/88d48eee49c1f0165eed to your computer and use it in GitHub Desktop.
Kill defunct processes
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
# Find all parents and kill the whole process tree | |
ps xao pgid,ppid,pid,comm | grep defunct | awk '{print -$2}' | sort -n | uniq -d | xargs sudo kill -9 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment