Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
up vote 6 down vote accepted

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.

share|improve this answer
You need to correct typo in answer. Should be lsof | wc -l. You don't have a space before the -l – Richard Holloway May 4 '10 at 21:16
Thanks for the speedy answer! – arikfr May 4 '10 at 21:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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