Search code examples
linuxulimitlsof

lsof outputs greater than ulimit -Hn


The following commands run in a single session shows lsof size greater than ulimit supported size. How is this possible?

$ lsof | wc -l
226863
$ ulimit -n
200000
$ ulimit -Hn
200000

Solution

  • Not really on-topic here, but the answer is simple. lsof lists all open files systemwide. ulimit shows the limit for one shell session.