Last active
November 23, 2018 19:49
-
-
Save cossio/401785daddb92433d96262103bf3cdc5 to your computer and use it in GitHub Desktop.
To find the list of processes with PPID = 1.
This file contains hidden or 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
pgrep -P 1 -u cossio # lists the PID of processes with PPID = 1 | |
pgrep -P 1 -u cossio | xargs ps -p # prints the PID and some more info | |
pgrep -P 1 -u cossio -f julia | xargs ps -o pid,ppid,command -p # print orphaned julia procs | |
pgrep -P 1 -u cossio -f julia | xargs kill # kill them |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment