Skip to content

Instantly share code, notes, and snippets.

@7rin0
Last active July 14, 2017 21:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 7rin0/712da74a6d352cc1464a2a8c5fb2d332 to your computer and use it in GitHub Desktop.
Save 7rin0/712da74a6d352cc1464a2a8c5fb2d332 to your computer and use it in GitHub Desktop.
Unix Proccess Serial killer
# 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