Listing files open by a program

Run
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.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s