how to output a process's working directory to a file?
I am currently running Ubuntu 12.04 and am trying to create a script to output the names of running processes along with their working directories into a file the as such:
The reason behind this script is to allow me to have access to the working directories of running processes so that I can tell where they are coming from. I'm relatively new to terminal scripting so i'd like to know if i'm on the right track.
Process Working Directory
(I don't know the working directory of firefox, so i used the path above as an example of the format i need.)