Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PWD Doesn't work

Status
Not open for further replies.

beamrider

IS-IT--Management
Sep 4, 2002
6
0
0
US
We have a 5.0.5 system that suddenly lost it's ability to display and use the present working directory. PWD returns nothing when used by itself and an error when another program calls it. And LOTS of programs use it (scoadmin for one).

You can change to any directory you want and any program that doesn't depend on pwd seemsto work ok.

Has anybody ever seen this?
 
pwd is normally a shell-builtin. Try using /bin/pwd perhaps and see if it's the same? The pwd man page suggests that if it returns an error you may have filesystem trouble, in which case you could try an fsck.

Does the $PWD variable contain the right values? Annihilannic.
 
First thing we tried was to run fsck and even placed a new /bin/pwd on the system, but neither worked.

Not sure what the $PWD variable would tell us, I tried it on our system here in the office that is running correctly and it returns nothing (I assume you mean "echo $PWD").

We are going to be rebuilding the system Monday if we don't find anything (bummer).

Thanks for the reply and if there's something more you think I should do with the $PWD, let me know.
 
My first suspicion is that you have some bad symbolic links which are preventing pwd from following the directory structure back to the root. You might try some of the utilities for fixing symbolic links if you can get them to work.

If you "su" and then "cd /", does pwd work when you are at the root itself?

If you "ls -l" does it show full paths for the files in the current directory?
 
whats the permissions of pwd file?
does it core dump when your run it i.e. are there any core files created ?

have you got another sco 5 system , where youcan
a. check pwd file
b. copy it to this server and try .

$PWD basically tells you which directory you are in you can use it for e..g if you are rcping to another box and your
in a larhe directory and whan tto copy the file to the remote server in the large directory you can use $PWD i.e.

cd /usr/bi/dir/this/is/massive/man/u/know

rcp file node2:$PWD

hth
 
PWD doesn't work in the root either. Just typing "pwd" returns nothing. No error or path.

No core dump ever happens. When we enter a program that seems to need the "pwd", it returns an error "pwd: read error in .."

I would try the "ls -l", but the system is currently en route here to be rebuilt.

Thanks for the help and I still have until Monday to fix it before reload, so I'll keep my eyes open.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top