Filesystem – Why macOS Doesn’t Have /proc Directory Explained

filesystemkernelmacos

What is the reason that /proc does not exist in OS X? I was curious to find file descriptors that a process was using in my Mac. The way I do it in linux is to go in /proc/fd folder of that process.

How do I find what fds are used by a process?

Best Answer

Going back to basics : Ubuntu is a GNU/Linux, OS X is a FreeBSD : Different systems, different way to work.

On OS X you can use lsof to see the open files.

$lsof -p 68180

would show you every files opened by the process with pid 68180.