Skip to content

Instantly share code, notes, and snippets.

@prathik
Created August 18, 2016 10:24
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 prathik/d46dbf37c619ada1e3d5877165f6cf6d to your computer and use it in GitHub Desktop.
Save prathik/d46dbf37c619ada1e3d5877165f6cf6d to your computer and use it in GitHub Desktop.
Kill Grep. Kill a matching process. Add in your .zshrc or your .bashrc
killGrep()
{
ps aux | grep $1 | grep -v grep | tr -s " " | cut -d " " -f 2 | xargs kill -9
}
alias kg=killGrep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment