Inodes
Jonathan Hawbrook-Clark
jhc at att.ATT.COM
Thu Mar 9 09:03:21 AEST 1989
In article <TALE.89Mar7015647 at imagine.pawl.rpi.edu> tale at pawl.rpi.edu writes:
>The situation is this: /develop has four subdirectories names
>consult1.[1|2|3|4]. consult1.1 and .3 both are fine, but consult1.2
>and .4 have a problem with ..: getwd() can't open it, which breaks ...
You didn't bother to mention which OS this is, but for an AT&T file system
I would bet that you've got a clobbered directory; try this:
od -c /develop/consult1.[24]
If you see that the first few lines are either all nulls or just
yucky, specifically that there are no entries for '.' or '..', then
there is your problem. The fix is to move everything you can out of the
directory, 'rm -fr' what's left, then move it back in again.
We had a similar problem; Bourne shell gave the results you describe, but
Korn shell worked perfectly: ksh tracks the current directory and 'pwd'
is a built-in. sh uses /bin/pwd which uses getcwd(2), which runs up
the parent directories until it loops, which is root (usually). When
it can't find a '..' then it says something like 'Cannot stat ..!' and
dies. Took us quite some time to track this one down.
--
Jonathan Clark jonathan at mtune.att.com, attmail!jonathan
Any affiliation is given for identification purposes only.
The Englishman never enjoys himself except for some noble purpose.
More information about the Comp.unix.wizards
mailing list