I would like to know if there is some utility that can show how many open files I have on an Ubuntu server?
Asked
Active
Viewed 1.1k times
1 Answers
12
As root
lsof | wc -l
This will give you the number of lines returned by lsof. This utility lists all open files, including things like network sockets, so also man lsof for more options on what types of files are displayed.
Cory J
- 1,528
- 4
- 19
- 28
-
1You need to correct typo in answer. Should be `lsof | wc -l`. You don't have a space before the -l – Richard Holloway May 04 '10 at 21:16
-
3I get `lsof: no pwd entry for UID 999` entries above the total. How can I get rid of those too? – servermanfail Nov 23 '17 at 04:16