I would like to know if there is some utility that can show how many open files I have on an Ubuntu server?


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.

  • 1
    You need to correct typo in answer. Should be lsof | wc -l. You don't have a space before the -l May 4 '10 at 21:16
  • 2
    I get lsof: no pwd entry for UID 999 entries above the total. How can I get rid of those too? Nov 23 '17 at 4:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.