I would like to get a list of open files in a process on os x (10.9.1). In Linux I was able to get this from /proc/PID/fd. However I\'m not sure how to get the
I had a hard time getting Activity Monitor to show open files for a process that was running as root (via sudo). The original question mentions lsof, and it does the trick exactly. If you know the process name or PID, it's super quick.
Find processes by name:
lsof -c processname
Find processes by PID:
lsof -p 123
(Prefix with sudo as needed, such as if you are not the owner of the process.)