-
-
Save eklect/db0f86a11629ee03dbdb9e1d1f577015 to your computer and use it in GitHub Desktop.
Linux → Kill a process by an ID that is found by a keyword in its command
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
ps -ax | grep PROCESS_NAME_HERE | grep KEYWORD_HERE | awk '{print $1}' | xargs kill -9 | |
#Example | |
# ps -ax | grep php | grep importData | awk '{print $1}' | xargs kill -9 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment