9

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?

10

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.

  • 5
    This post doesn't really answer the question. It states that the reson is FreeBSD, but FreeBSD does have /proc – el.pescado Jul 13 '15 at 17:00
  • 5
    it does not answer the question. E.g. /proc/cpuinfo or /proc/meminfo - these have nothing to do with lsof. – javadba Aug 19 '15 at 21:07
  • 2
    macOS isn't based off of FreeBSD, but rather a mixture of BSD and FreeBSD. This chart may be of use. – JMY1000 Feb 21 '17 at 10:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .