Last active
July 14, 2017 21:23
-
-
Save 7rin0/712da74a6d352cc1464a2a8c5fb2d332 to your computer and use it in GitHub Desktop.
Unix Proccess Serial killer
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
# Just replace SEARCH_PROCESS_SCRIPT_NAME by the script you want to stop | |
# https://unix.stackexchange.com/a/50573 | |
SEARCH_PROCESS_SCRIPT_NAME="php /var/www/application/bin/script.php" | |
for pid in $(ps -ef | grep $SEARCH_PROCESS_SCRIPT_NAME | awk '{print $2}'); do sudo kill -9 $pid; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment