Finding process count in Linux via command line

Posted by Moev4 on Stack Overflow See other posts from Stack Overflow or by Moev4
Published on 2010-06-17T00:31:21Z Indexed on 2010/06/17 0:42 UTC
Read the original article Hit count: 224

Filed under:
|
|
|

I was looking for the best way to find the number of running processes with the same name via the command line in Linux. For example if I wanted to find the number of bash processes running and get "5". Currently I have a script that does a 'pidof ' and then does a count on the tokenized string. This works fine but I was wondering if there was a better way that can be done entirely via the command line. Thanks in advance for your help.

© Stack Overflow or respective owner

Related posts about linux

Related posts about command-line