Xref: utzoo comp.sys.hp:1270 comp.unix.questions:10344 Path: utzoo!utgpu!watmath!clyde!att!ulysses!gamma!sword!faline!bellcore!rutgers!mailrus!nrl-cmf!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.sys.hp,comp.unix.questions Subject: Re: Huge directories Keywords: Huge directories Message-ID: <8984@smoke.BRL.MIL> Date: 26 Nov 88 09:41:34 GMT References: <706@prlhp1.prl.philips.co.uk> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 16 In article <706@prlhp1.prl.philips.co.uk> pearmana@prlhp1.prl.philips.co.uk (Andy Pearman) writes: >Even after most of the files in these directories disappear >it still says "Huge directory". >Do I have to compress the directory in some way and if so >how do I go about doing this ?? Except on systems that perform directory compaction (rumored to be true for 4.nBSD, n >= 2, although I've never seen it happen), UNIX directories never shrink even though entries are "deleted" from them. A deleted entry merely has its inumber changed to 0. The simplest way in such circumstances to reclaim some disk storage is to make a new directory, plant the same inode links in it (using "mv" or "ln"), then remove the old directory and rename the new one to the original name. By the way, you can look at the allocated size of a directory (in blocks) by "ls -sd dir_path_name".