how to check open file without lsof

qrtt1 picture qrtt1 · May 29, 2012 · Viewed 19k times · Source

In linux, I use lsof to check the file is opened by which process. I have an android device, but no lsof command. Is it possible to find which process open the specific file ?

I will use it to verify the MediaPlayer hold a fd, but it should be closed.

Answer

johsin18 picture johsin18 · Feb 25, 2013

Poor man's lsof is to execute

ls -l  /proc/[process id]/fd

Still, you need to be root.