On 07/05/2016 01:36 PM, Joe Zeff wrote:
On 07/05/2016 11:35 AM, Rick Stevens wrote:
> Yeah, I use that one a lot, too. "pidof -x" is useful as well and you
> don't need the greps.
One of the wonderful things about *nix is the fact that there are so
many different ways to get exactly the same results, depending on
personal preference.
Since "pidof" doesn't do the grep, so you need to specify the entire
process name (e.g. "pidof chron" gets nothing, "pidof chronyd" gets
the
PID of the chronyd process).
In that sense, your "ps aux | grep | grep -v grep" is a more flexible
in that you only need to know part of the process name. I use it a lot
myself--but not to the point of turning it into a script/utility. :)
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital ricks(a)alldigital.com -
- AIM/Skype: therps2 ICQ: 226437340 Yahoo: origrps2 -
- -
- A day for firm decisions!!! Well, then again, maybe not! -
----------------------------------------------------------------------