Archive

Posts Tagged ‘psgrep’

Shell One-liner: psgrep

July 6th, 2015 2 comments

When I want to find out specific process information, I usually use ps aux | grep PATTERN. There are several drawbacks, but the most annoying one for me are the missing coloumn headlines. Therefore, I made this little alias and put it into my global bash.bashrc file:

alias psgrep=’ps u | head -n 1; ps aux | grep -v grep | grep’

This enables a psgrep command which can be used like grep (since that is exactly what it is).

psgrep

 

Maybe some of you know an even better way? Cheerio!

Categories: bashism, linux Tags: ,