Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!virtech!cpcahil From: cpcahil@virtech.UUCP (Conor P. Cahill) Newsgroups: comp.unix.wizards Subject: Re: Can directory files have holes in them ? Message-ID: <1240@virtech.UUCP> Date: 6 Oct 89 15:17:20 GMT References: <1212@accuvax.nwu.edu> <442@ecs.soton.ac.uk> Organization: Virtual Technologies Inc Lines: 24 In article <442@ecs.soton.ac.uk>, tjc@ecs.soton.ac.uk (Tim Chown) writes: > In article <1212@accuvax.nwu.edu>, naim@accuvax.nwu.edu (Naim Abdullah (CSRL)) writes: > > In 4.3bsd, is it possible for a directory file to have holes in it ? > > Sure is. Here's an example with the nrsdbm files that are commonly > used in the UK as an online database of mail/ftp sites: Your example shows a regular file with holes in it. The original poster was asking about a directory file with holes in it. I, for one, cannot figure any way you could get holes in a directory because the mechanism to generate holes is to lseek beyond the end of the file and write some information, thereby generating a hole between the old end of the file and the new data (assuming there was at least 1 full block between the two. The kernel shouldn't have any reason to seek beyond the end of the file and therefore shouldn't create a directory with holes in it - But this is only guesswork. -- +-----------------------------------------------------------------------+ | Conor P. Cahill uunet!virtech!cpcahil 703-430-9247 ! | Virtual Technologies Inc., P. O. Box 876, Sterling, VA 22170 | +-----------------------------------------------------------------------+