Oct
23
*nix command of the day
Filed under technical at 8:03 pm | 3 Comments
I’m taking a few days of training this week for a specific suite of products. During class today I learned about a really simple command: pgrep. It lets you grep through running processes based on numerous attributes. For years I’ve always done something like ps auxww | grep foo when all I really needed was pgrep foo. Why didn’t anyone ever enlighten me? Think of how many fewer characters I could have typed in my lifetime …
No, it’s not earth-shattering, and it’s not like I was using cat file.txt | wc -l rather than wc -l file.txt. (Now that would be embarrassing.) Still, it’s refreshing every now and then to learn simpler ways to do things.