Linux Administrator - Find Location Of File Used By Process ID (PID)

Linux Administrator

Privacy Policy

RSS Feed

Acoustic Guitar Tips
Anna Kendrick
Beekeeping Tips
Catherine Zeta Jones
My View On Things
Cheap Auto Insurance
Cheap Places to Live
Delta Shaper
Easy Wood Projects
Felicity Jones
Free Sheet Music
Funny Clean Jokes
Healthy Carbs
Heidi Klum
Improve Your Credit
Ivory Tower Group
Keke Palmer
Linda Ronstadt
Linux Administrator
Money Spigot
Nicole Kidman
Planet Cabinet
Quality Dating Advice
Rustic Cabinets
Sacramento Hiking
Sandra Bullock
Spintax Tool
The Actress
Tristan Prettyman
Viola Davis
Who Are The Beatles

Find Location Of File Used By Process ID (PID)

Find Location Of File Used By Process ID (PID)

If you have some processes you don't recognize, you might want to find the location of the file that's being run. In order to do this, get the process ID (PID) by typing:

ps awx

Once you have the PID, do this:

cd /proc/PID
cat environ

The PWD line will probably tell you where to look.


www-data 15554 186 0.0 54084 1668 ? Ssl 10:06 17:36 ./kernelupdates -B -o stratum+tcp:// -u spdrman.10 -p passxxx

cd /proc/15554

The environ file shows that the file was running from /tmp/.ice-unix

Return To Main Page