Alternate for pwdx in HPUX

Thread Tools Search this Thread
# 1  
Alternate for pwdx in HPUX

I need alternate command as pwdx does not work on

HP-UX mymachine B.11.31 U ia64 3223107173 unlimited-user license

# 2  
pwdx is a linux command I doubt it exist under HP-UX or AIX ( up to 6.1...), solaris 10 has something though...
# 3  

Originally Posted by vbe
pwdx is a linux command I doubt it exist under HP-UX or AIX ( up to 6.1...), solaris 10 has something though...

Can you design any script for HPUX or any tool with a similar functionality as I am habitual to using it.
# 4  
hpux doesn't even have /proc, so getting that kind of information from the outside is difficult. At a glance, not even pstat has that info available, though I don't have an HP-UX machine to check. You might be able to play with ps options.

I don't think using pwdx was a good habit to have gotten into, honestly. What functionality do you need it for? Usually those sorts of paths are supposed to be defined, not inferred.
# 5  
This should produce similar results on HPUX with lsof installed
lsof -p 2912 | awk '$4 == "cwd"'

---------- Post updated at 01:25 AM ---------- Previous update was at 01:25 AM ----------

This should produce similar results on HPUX with lsof installed
lsof -p 2912 | awk '$4 == "cwd"'

This User Gave Thanks to Peasant For This Post:
# 6  
I get an output as below.

==> lsof -p 11467 | awk '$4 == "cwd"'
java_q4p 11467  bea  cwd    DIR           2,0xc351       8192    11238 /opt/app/bea/user_projects/domains/base_domain

Can you please explain me the significance of your command below ?

awk '$4 == "cwd"'

# 7  
If the field 4 of the lsof -p pidoutput is cwd, print that line.
Using awk instead of grep, since it will limit the search on only forth field.

cwd is current working directory, for more info consult lsof manual.

Hope that helps

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

10 More Discussions You Might Find Interesting

1. OS X (Apple)

The Alternate DC board for

Hi guys... Well I have entered an area of partial insnity... ;o) Below is a photo of the 'ALTDC' board for I have decided to incorporate all three methods for obtaining DC into this MBP via the MIC input. 1) VFO. 2) CHOPPER. 3) COUNTER. The controller for the COUNTER... (9 Replies)
Discussion started by: wisecracker
9 Replies

2. HP-UX

Alternate for wget

Hi, Whats the alternate for wget in HP-UX ? (4 Replies)
Discussion started by: mohtashims
4 Replies

3. HP-UX

pwage-hpux-T for Trusted HPUX servers

I'm sharing this in case anybody needs it. Modified from the original solaris pwage script. This modified hpux script will check /etc/password file on hpux trusted systems search /tcb and grep the required u_succhg field. Calculate days to expiry and notify users via email. original solaris... (2 Replies)
Discussion started by: sparcguy
2 Replies

4. Shell Programming and Scripting

Wants alternate to the Sleep option??

I am new to Shell Scripting and I need help to write the following script in a different format... This is the current script: #!/usr/bin/ksh environment=rms export environment . $AW_HOME/RETEK/exec/RETEK_ENVAR ls -ltr $MMPOS/RTLOG* | tr -s " " | cut -d " " -f9... (20 Replies)
Discussion started by: satyajit007
20 Replies

5. Shell Programming and Scripting

Need Script to Use CPUs on a HPUX server to simulate Workload Manager on HPUX.

I am running HPUX and using WLM (workload manager). I want to write a script to fork CPUs to basically take CPUs from other servers to show that the communication is working and CPU licensing is working. Basically, I want to build a script that will use up CPU on a server. Any ideas? (2 Replies)
Discussion started by: cpolikowsky
2 Replies

6. HP-UX

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... (10 Replies)
Discussion started by: oracleuser
10 Replies

7. Shell Programming and Scripting

alternate lines

Hi, I'm new to Unix. I want to read the all the lines from a text file and write the alternate lines into another file. Please give me a shell script solution. file1 ----- one two three four five six seven newfile(it should contain the alternate lines from the file1) ------- one... (6 Replies)
Discussion started by: pstanand
6 Replies

8. Shell Programming and Scripting

Alternate way for echo.

Hi, Is there any other command echo does. if I am doing this operation for each line in my file. So its taking very long time to process more than 1000 records. Is there any alternative way to write the above if statement (5 Replies)
Discussion started by: senthil_is
5 Replies

9. UNIX for Advanced & Expert Users

Alternate to pinging boxes

Hello, We have boxes on a WAN network I guess you would call it, pretty much they are hooked up via DSL in different locations in the US and we connect to them via SSH for a secure connection. Some of the boxes won't return a ping request like they are down, I am guessing is because the router... (5 Replies)
Discussion started by: benefactr
5 Replies

10. Shell Programming and Scripting

Cronjob on alternate sundays

I want to set the crontab job for one of my SIEBEL database to refresh it on alternate sundays. Is there anyway I can do it through cron please ? If not whats the alternative ? :confused: Thanks in advance. (6 Replies)
Discussion started by: abhi123
6 Replies

Featured Tech Videos