Created
August 18, 2016 10:24
-
-
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
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
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