Created
July 11, 2016 21:46
-
-
Save dev-pmartins/105a8252bfd745de111f2a271eb552ae 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
########### | |
# Matar todos os processos por palavra chave | |
# Kill A lot of process by keyword | |
########## | |
# ps auxf (Só para identar os processos por hierarquia) | |
# ps auxf (Just list all process orderly by hierarchy) | |
# grep worker (Grep ué, filtra os resultados pela palavra chave) | |
# grep worker (Filter output by informated keyword) | |
# awk (Pega a coluna de acordo com os headers, exemplo: awk {print $1} = primeira coluna de output) | |
# awk (get informated column by command head, example: awk {print $1} = first column from output) | |
# xargs (Pega a saida dos comandos anteriores, e itera no comando exposto via argumento) | |
# xargs (Get previous output, and iterate with command informated after xargs) | |
ps auxf | grep worker | awk '{print $2}' | xargs kill -9 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment