I need to count the open files for the active processes in the current session. But Only regular files. I don´t know how to “mix” the ps command with the lsof command.
Lsof doesn´t return which processes belong to the current session. And when i use ps to list the active processes, i dont know how to save the pids to look it for with the lsof command.
I need to count the open files for the active processes in the current
Share
You can pass a comma-separated list of pids to
lsofusing command substitution as follows: