LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how can I count how many of my processes are running (https://www.linuxquestions.org/questions/linux-newbie-8/how-can-i-count-how-many-of-my-processes-are-running-842117/)

HarryBoy 11-03-2010 09:08 AM

how can I count how many of my processes are running
 
Hi, I list all the instances of a running process my doing:
ps -ef | grep myprogram

This lists all them.

how can I simply output a count of how many are running???

crts 11-03-2010 09:14 AM

Do you mean something like
ps -ef | grep myprogram | wc -l

HarryBoy 11-03-2010 09:42 AM

spot on :) cheers


All times are GMT -5. The time now is 04:54 AM.