title: how does the lsof command get its information on linux
body: <p>The <code>lsof</code> command can list open files including network connections.</p>
  
  <p>I think it should works just like the other system tools which gather information from the <code>/proc/</code>, <code>/dev/</code> or <code>/sys</code> locations in the Linux filesystem.</p>
  
  <p>But when I tried to find information about open files from these locations, I failed:</p>
  
  <pre><code>ls /proc/self/fd
  ls /proc/net/tcp
  ls /dev/fd/
  </code></pre>
  
  <p>How does <code>lsof</code> get this information?</p>