pwdx equivalent on HP

In sun solaris, pwdx will give the print working directory.

Suppose I have 5 databases running on different oracle versions.

If I want to know what database is running on what oracle version, I just give pwdx <process id>. It will show the oracle home details.

Could you give me the equivalent command on HP UX please.

Thanks

Hello,

in HP-UX it's PWD !

Regards

Thanks for the reply. But my question is how to check any process's home directory.

ps -ef | grep pmon
This will give you pid and ... all the info.

Suppose if I want to know the home(working) directory of that process in sun there is a command pwdx. pwdx <pid> will show you the home direcotry of any process.

What is the equivalent on HP. Or how can I check any process home/working direcotry?

Thanks,

Only way I know is to install lsof and use that.

And the closest I can get with lsof would be:
lsof -p <PID>|grep cwd or |more...

Thanks guys for the reply.
I don't have lsof installed. If any other work around please let me know.

Thanks,

So install it. It's free. Link: lsof-4.80

Thanks Perderabo.
But this is for my client, and I am not a sysadmin. I am an oracle Dba, I can not justify the need. Lot of change control process are there.. they may not approve.

Anyways thanks for the help.

What's the problem with the standard way (oratab sid <-> oracle home mapping)?

You can even use the wrapper script dbhome that Oracle provides: dbhome $ORACLE_SID.

>I am an oracle Dba, I can not justify the need.

Oh yes you can, the DBA's here at my work have asked lsof be a prerequisite to OA installation, how will you solve socket / port issues without? etc...

Thanks radoulov. dbhome <SID> solved my issue.
Thank you all. Appreciate the help.

Thanks,