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 same on OS X. I found that the procfs is not present on the OS X (by default. possible implementations present, but I do not want to go that way).
So how do I get (natively) the list of open files in a process on OS X. One way is lsof
. is there any other support available? please let me know where I can get more info on this.
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…