Created
August 21, 2017 10:21
-
-
Save AmaranthLIS/c979832d6472e27853aa80a725bf4d3c to your computer and use it in GitHub Desktop.
show and kill process by PID
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
pstree 32567 | |
pstree -p 32567 | |
pstree -p 32567| perl -ne 'print "$_\n" foreach /\((\d+)\)/g;' | |
pstree -p 32567| perl -ne '`kill -9 $_` foreach /\((\d+)\)/g;' | |
pstree -p 32567| perl -ne 'print "$1\n" while /\((\d+)\)/g;' | |
pstree -p 32567| perl -ne '`kill -9 $1` while /\((\d+)\)/g;' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment