7

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

1 Answer 1

13

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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .