Linux we generally use PS to view process information, but the process information given by PS is limited, there is no process work path, the absolute path of the process command and so on, at this time we can through Linux under the/proc/directory stored information for query process command path information.
Linux, after any program is started, the system assigns it an ID, the familiar PID, called the process number, at the same time, the system creates a separate folder for it in the/proc directory, and the folder is named after the PID, which holds the detailed information about the process running in the folder. Interested friends can go into this directory to study, but today's focus is to get the absolute path to the process.
In/proc/This directory has a file named EXE, like the executable file under Windows system, which is actually a symbolic link (similar to a shortcut under Windows) that points to the absolute path of the process counterpart. Use the file command or the LS command to view the properties of the symbolic link to get the absolute path it points to: Ls-l/proc/pid/exe File/proc/pid/exe
Change the PID in the command above to the Linux process number you want to query. --Eof-truevue--