Question: How can lsof report more open files than what ulimit says is the limit?

```
prod_web3(i-ca0b05aa):~$ sudo lsof | wc -l
4399
prod_web3(i-ca0b05aa):~$ ulimit -n
1024

```

Answer: 
Although this is old, I wanted to ask the same question... the answer is not satisfactory in my case as this is what happens:

```
$ sudo su tomcat -c "ulimit -n"
1024
$ lsof -u tomcat
3967

```

I'm not entirely sure why this happened. I guess that open files from sub process are not accounted for in the parent one.
A bash(1) builtin, ulimit defines the maximum number of open files per process.

This is not a system-wide setting in any way.