Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!ukma!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!att!jhc From: jhc@att.ATT.COM (Jonathan Hawbrook-Clark) Newsgroups: comp.unix.wizards Subject: Re: Inodes Message-ID: <2623@att.ATT.COM> Date: 8 Mar 89 23:03:21 GMT References: Reply-To: jhc@att.ATT.COM (Jonathan Hawbrook-Clark) Distribution: comp Organization: AT&T Bell Laboratories, Middletown, NJ, USA Lines: 26 In article tale@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@mtune.att.com, attmail!jonathan Any affiliation is given for identification purposes only. The Englishman never enjoys himself except for some noble purpose.