The number of processes a user is running using bash

Viewed 24405

I would like to know how I could get the number of processes for each user that is currently logged in.

9 Answers

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.

Related