Who is using the file/resources

Getting information about processes

In linux you can get all the process in this directory

/proc

/proc/proc_id
has many files and folder about processa info

There are multiple ways like:

pwdx

$ pwdx

lsof

$ lsof -p | grep cwd

/proc

$ readlink -e /proc//cwd

Examples

Say we have this process.

$ pgrep nautilus
12136

Then if we use pwdx:

$ pwdx 12136
12136: /home/saml

Or you can use lsof:

Advertisements

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