I want to find which processes contain some file in C code (Linux).
One of the ways that comes to my mind is to look proc/<PID>/fdat all the running processes. However, this will take a very long time and due to sweeping all the files in the files of fdall processes.
Could you give another easier method?
Thanks in advance.
source
share