16

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?

grg
  • 201,078

1 Answers1

14

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.

Matthieu Riegler
  • 21,486
  • 11
  • 59
  • 97