Hello all,
i would like to count the number of process in terminal.
I don't know exactly how to do this.
After informing into internet, i may use the combination of ps with grep.
I tried:
ps -aux | grep process_name
And i get all the lines of process with the defined name.
Normally grep has the option -c to count the lines, but it doesn't work here. why?
With -n seems that i get the line number and the line. Do i have the info that i need?
There is no possibility to check command man-page? with man. nor alternative?
Could someone help me for this please?
Thank you very much in advance.
Cheers
| 2 | No.2 Revision |
Hello all,
i would like to count the number of process in terminal.
I don't know exactly how to do this.
After informing into internet, i may use the combination of ps with grep.
I tried:
ps -aux | grep process_name
And i get all the lines of process with the defined name.
Normally grep has the option -c to count the lines, but it doesn't work here. why?
With -n seems that i get the line number and the line. Do i have the info that i need?
There is no possibility to check command man-page? with man. nor alternative?
edit. commands which work:
ps aux | grep process_name | wc -l
ps aux | grep -c process_name
Should be no '-' before 'aux'
Could someone help me for this please?
Thank you very much in advance.
Cheers