Operating System - HP-UX
1752572 Members
4408 Online
108788 Solutions
New Discussion юеВ

Re: 'pwd' command not working in a particular directory.

 
N,Vipin
Frequent Advisor

'pwd' command not working in a particular directory.

Please find the problem text.

host1:daaadm 1> cd /sapmnt/PEP/logs
host1:daaadm 2> pwd
pwd: No such file or directory
host1:daaadm 3>

Any idea where I have to look.

18 REPLIES 18
Patrick Wallek
Honored Contributor

Re: 'pwd' command not working in a particular directory.

Did the directory get removed?

What happens if you do an 'ls'?

What are the permissions on the directory?
Patrick Wallek
Honored Contributor

Re: 'pwd' command not working in a particular directory.

Are you sure you are running the correct 'pwd' command?

What does 'whence -v pwd' show? It should return something like "pwd is a shell builtin".

The only way I was able to duplicate this was by:

cd'ing into a directory
remove that directory from another terminal
Execute /usr/bin/pwd rather than just 'pwd'.

N,Vipin
Frequent Advisor

Re: 'pwd' command not working in a particular directory.

Did the directory get removed? No..

What happens if you do an 'ls'?

host1:daaadm 4> ls
host1:daaadm 5> ll
total 0
host1:daaadm 6>

What are the permissions on the directory?

drwxr-xr-x 2 pepadm sapsys 1024 Oct 20 2009 logs


Are you sure you are running the correct 'pwd' command?

host1:daaadm 14> which pwd
INSTANCEDIR_LIST: Undefined variable.

What does 'whence -v pwd' show? It should return something like "pwd is a shell builtin".

host1:daaadm 13> whence -v pwd
whence: Command not found.

daaadm is using csh

The only way I was able to duplicate this was by:

cd'ing into a directory
remove that directory from another terminal
Execute /usr/bin/pwd rather than just 'pwd'.

The directory is still exist.

host1:daaadm 15> /usr/bin/pwd
pwd: No such file or directory
Dennis Handly
Acclaimed Contributor

Re: 'pwd' command not working in a particular directory.

What are the permissions of each of the paths:
ll -d /sapmnt/PEP/logs /sapmnt/PEP /sapmnt
muruganantham raju
Valued Contributor

Re: 'pwd' command not working in a particular directory.

Hi,
pwd command is located in /usr/bin/pwd. Your output shows that there is no pwd in /usr/bin.
Can you run "which pwd" and see where is pwd located?
Is the pwd command working fine for other directories?

Regrds,
Muru
Deeos
Regular Advisor

Re: 'pwd' command not working in a particular directory.

have you checked pwd command with some other user or root user?

Can you post output of following command?

#echo $PATH

#more .profile of your current logged in user

#cd /usr/bin

#ll pw*




Regards
Deeos
Deepak
Kapil Jha
Honored Contributor

Re: 'pwd' command not working in a particular directory.

what does
#type pwd
says
and find pwd it should be in /usr/bin/pwd

and one more thing is it happening on all directory or specific this directory.

check echo $PATH

BR,
Kapil+

I am in this small bowl, I wane see the real world......
N,Vipin
Frequent Advisor

Re: 'pwd' command not working in a particular directory.

/usr/bin is available in the PATH.

host1:daaadm 5> type pwd
pwd is a shell builtin.

One more information, The /sapmnt/PEP is nfs filesystem which is exported from the same server. The original filesystem is /export/sapmnt/PEP. The pwd command is working fine if you go to the original filesystem.

host1:daaadm 2> cd /export/sapmnt/PEP/logs
host1:daaadm 3> pwd
/export/sapmnt/PEP/logs
host1:daaadm 4> cd /sapmnt/PEP/logs
host1:daaadm 5> pwd
pwd: No such file or directory
host1:daaadm 6>

as a root user the pwd command is working fine in the same directory.

Is it bug in HP UX 11.31???



Kapil Jha
Honored Contributor

Re: 'pwd' command not working in a particular directory.

can you try
#cd /sapmnt/PEP/logs
#/usr/bin/pwd

which is this user and please try
echo $PATH for this user.

BR,
Kapil+
I am in this small bowl, I wane see the real world......