Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!thumper!ulysses!mhuxo!mhuxt!mhuxi!mhuxh!mhuxu!att!rutgers!ucsd!ucbvax!A.CC.UMICH.EDU!rees
From: rees@A.CC.UMICH.EDU (Jim Rees)
Newsgroups: comp.sys.apollo
Subject: Re: File space allocation/deallocation under Unix (BSD4.x)
Message-ID: <8807130122.AA02134@a.cc.umich.edu>
Date: 13 Jul 88 01:19:59 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Reply-To: rees@caen.engin.umich.edu (Jim Rees)
Organization: The Internet
Lines: 16


         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?

No.

The space in the directory doesn't get reclaimed, but that's not the same
thing.  If you create 1200 files, you end up with about a 50K directory
(1200 * 44 bytes per directory entry).  Then if you delete all the files,
you still have a 50K directory.  The space used by the files is reclaimed,
but the space used by the directory is not.

This is all different (better) at sr10.
-------