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
This works for some things:
sudo fs_usage | grep dev
for /dev/
files or similar.
"You can get the list of open files by process via the default activity monitor application. Just double click on the relevant process on the list and select "Open Files and Ports" tab on the popup." But "you had a hard time getting Activity Monitor to show open files for a process that was running as root (via sudo) or others user".
So just run Active Monitor
by sudo, that`s it
sudo /Applications/Utilities/Activity\ Monitor.app/Contents/MacOS/Activity\ Monitor