Xref: utzoo comp.unix.questions:8275 comp.unix.wizards:9952 comp.sys.apollo:1122 Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!mailrus!tut.cis.ohio-state.edu!osu-cis!att!whuts!homxb!genesis!hotlr!anumb!eao From: eao@anumb.UUCP (e.a.olson) Newsgroups: comp.unix.questions,comp.unix.wizards,comp.sys.apollo Subject: Re: File space allocation/deallocation under Unix (BSD4.x) Keywords: Unix, BSD, File, Delete Message-ID: <292@anumb.UUCP> Date: 16 Jul 88 14:34:26 GMT References: <9662@eddie.MIT.EDU> <17@tugiig> Reply-To: eao@anumb.UUCP (e.a.olson) Organization: AT&T Bell Laboratories - MV Lines: 13 In article <17@tugiig> plipp@tugiig (Lipp Peter) writes: >In article <9662@eddie.MIT.EDU>, rich@eddie.MIT.EDU (Richard Caloggero) writes: >> If you create a directory "d", then create a file "d/f" 1 megabyte >> long (big), then "rm d/f", is it true that the space remains allocated >> to directory "d" and cannot be garbage collected or otherwise reclaimed >> until another file is created in directory "d" or "d" is deleted? If this is true, why? I believe that directory blocks are never reclaimed until the directory is deleted. If you have many files in a directory, (i.e. more entries than can fit into a directory block), one entry in the first block points to another disk block for more name-inode entries. Even if you later clean up that directory so that there are only enough entries to fit into one disk block, the indirect block is retained.