3 ms·
I'm curious as to why the sheet recommends 'ps aux | grep' without bothering to mention the self-match (and tricks to avoid it like doing grep '[f]oo') instead
by ecma 13y ago
I'm curious as to why the sheet recommends 'ps aux | grep' without bothering to mention the self-match (and tricks to avoid it like doing grep '[f]oo') instead of just presenting pgrep with the -f flag.
This reads like a naive user primer rather than a particularly detailed cheat sheet. I'd highly recommend that anyone interested in improving their nix-fu beyond what is presented in the article look at something like the Unix toolbox[1] (which I personally still find useful and recommend frequently) and take the time to dig through the man pages in order to learn how to use and chain these tools.
[1] http://cb.vu/unixtoolbox.xhtml http://cb.vu/unixtoolbox.xhtml
- JetSpiegel 13y agoThey even use pkill, so it would make sense to use pgrep as well.
- ama729 13y agoIMO "ps aux | grep" is better than pgrep, it's nicely formated and allow option like "--color", which allow to quickly find the option/process you were looking for.