Listing files open by a program

pidof program-name, and get the proc number

ls /proc/PID/fd/ -la

will list all opened files, even the deleted ones that you can still access!

You can also:

cd /proc/PID/fd

file -L *

to learn the type of each file

There are other interesting stuff in these directories, such as the cmd file with the command used to start the program and the net dir with the networking resources that this program is using.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s