Created
April 23, 2019 18:41
-
-
Save mattlong/ba56c8123c318e22e544f818fe4390ea to your computer and use it in GitHub Desktop.
Kill defunct proccesses
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 | |
parents_of_dead_kids=$(ps -ef | grep [d]efunct | awk '{print $3}' | sort | uniq | egrep -v '^1$'); echo "$parents_of_dead_kids" | xargs kill |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment