Created
July 24, 2019 17:10
-
-
Save morulus/281e02038aa304a95d9845843613ffc2 to your computer and use it in GitHub Desktop.
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
# List all node processes | |
ps -ef | grep " node" | awk '{print $8, $2}' | |
# Kill all node processes | |
ps -ef | grep " node" | awk '{print $2}' | xargs -n 1 bash -c 'kill -9 "$1" 2>/dev/null || echo "Pid $1 is invalid"' -- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment