If I have multiple copies of the same app on the disk, and only one is running, as I can see with ps, how can I know the absolute path to distinguish from the others?
Tell me more
×
Super User is a question and answer site for
computer enthusiasts and power users. It's 100% free, no registration required.
|
|
eg: % ps -auxwe | grep 24466 root 24466 0.0 0.0 1476 280 ? S 2009 0:00 supervise sshd % sudo ls -l /proc/24466/exe lrwxrwxrwx 1 root root 0 Feb 1 18:05 /proc/24466/exe -> /package/admin/daemontools-0.76/command/supervise |
||||
|
|
Source: http://serverfault.com/questions/62322/getting-full-path-of-executables-in-ps-auxwww-output |
||||
|
|
One way is ps -ef |
|||
|
|
The quick answer is to use See the Unix FAQ for a little more detail, particularly questions 4.3 and 4.4. |
|||
|
|
This command will display the path of the process from where it is running. |
||||
|
|