I would like to know how I could get the number of processes for each user that is currently logged in.
I would like to know how I could get the number of processes for each user that is currently logged in.
Here is my solution, for Linux:
$ find /proc –user $USER -maxdepth 1 -name '[0-9]*' | wc –l
This solution will not fail when the number of processes is larger than the command line limit.