Computing.Net > Forums > Unix > how can I get the full path of a running program ?

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

how can I get the full path of a running program ?

Reply to Message Icon

Name: Domenico
Date: July 17, 2000 at 03:29:48 Pacific
Comment:

Hello guys, I hope that someone of you can answer to this question:

How can I get the full path of a running program ?

As you know, the ps command does not return the program name with its full pathname, and I'm looking for a reliable, user-independent way of extracting this information from the operating system (the which command extracts this information from the user local environment !!!).

Thank you !!!!!!!!!!!!!!!



Sponsored Link
Ads by Google

Response Number 1
Name: frans
Date: July 27, 2000 at 05:35:44 Pacific
Reply:

ps -ef |more
ps -ef |grep {command}


0

Response Number 2
Name: Domenico
Date: August 4, 2000 at 06:18:29 Pacific
Reply:

The ps command does not return the FULL
pathname of a command ... it returns only
the command name !!!!


0

Response Number 3
Name: steve t
Date: August 12, 2000 at 01:01:58 Pacific
Reply:

Please try the following command (as root/super-user):

/usr/proc/bin/pwdx

where is the process id of the program of interest.

pwdx is a proc tool that prints the current working directory of the process.

Good luck and I hope this is what yyou're looking for. Please let me know. Thanks!


0

Response Number 4
Name: Domenico
Date: September 4, 2000 at 06:17:02 Pacific
Reply:

Thank you, Steve !!!

I found the pwdx command on SunOS together with other helpful commands. The problem I have can be resolved using the pmap rather than the pwdx command, because I need to know the location of the executable file of a running process, and the pmap command provides the name of each executable file and shared library loaded in the process address space.

Thank you for your help !!!

... now, the problem is: what can I do on other UNIX platforms ?


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: how can I get the full path of a running program ?

how to get the modified time of a file www.computing.net/answers/unix/how-to-get-the-modified-time-of-a-file/2110.html

Where can i get the drivers of SIS620 for UNIX? (Solaris 8.0) www.computing.net/answers/unix/where-can-i-get-the-drivers-of-sis620-for-unix-solaris-80/1733.html

Awk substring problem www.computing.net/answers/unix/awk-substring-problem/4897.html