Linux › Section H · Processes and resource utilization › Topic H.2

Open files, file descriptors, and lsof

To the kernel, a file, a pipe, a terminal and a network connection all look alike once a process has opened them: each is a small number called a file descriptor. Knowing how descriptors work, and how lsof lists them, solves some of the most puzzling problems an administrator meets.

In this topic

  • What a file descriptor is
  • Descriptors, open files and redirection
  • Seeing descriptors in /proc
  • Limits: too many open files
  • lsof: listing open files
  • Reading the FD and TYPE columns
  • Narrowing the output
  • Worked example: a filesystem that will not unmount
  • Worked example: a full disk that du cannot explain
  • Common mistakes to avoid
  • Key takeaways

This topic is part of Wuanberri Pro. Checking your access…

← Previous topicNext topic →