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 ?
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 !!!).
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 ?
Summary: Any way of getting the modified timestamp of a file in the format I want, say dd/mm/yyyy hh24:mi:ss format, irrespective of when the file is last modified. I'm working on SunOS 5.5.1 Thanks. ...
Summary: James, How can I get the whole path to a file that has embeded white spaces without knowing the file path? What I need is to extract any path starting with a captial letter followed by a colon that a...