I am looking for a command that would list me number of open files for each user, sorted descending.
For example lsof -u postgres | wc - would list them only for the postgres user, but I do want to see on which user I may loose handlers.
Note: some question may apply to PIDs instead of user names, but still, I am looking for a one liner.