Path: utzoo!attcan!uunet!bischeops!nick From: nick@bischeops.UUCP (Nick Bender) Newsgroups: comp.sys.hp Subject: Re: .sh_history explodes Summary: file still open Keywords: disk full Message-ID: <413@bischeops.UUCP> Date: 29 Jul 90 19:56:18 GMT References: <4@gauss.mmlai.UUCP> Lines: 21 In article <4@gauss.mmlai.UUCP>, burzio@mmlai.UUCP (Tony Burzio) writes: > > Every so often, the .sh_history will start to grow very large. After > a while (with the SCSI disk blinking away) the disk will fill up > completely. The operator console merrily tells me the disk is full > (oh be quiet, I KNOW! :-) To fix the problem, I delete the .sh_history, > but the disk usage (from bdf) doesn't drop until a reboot is performed. > I didn't see any other processes running, and the file wasn't locked. Disk space allocated to a file is not reclaimed until there are no *references* to the file. What constitutes a reference? A directory entry or a process with an open file descriptor. Thus if you have a program (a shell for example) with an open file (such as .sh_history) deleting the directory entry will not free the allocated disk space. Programs which write log files often cause this confusion as things such as du will give different results than df after someone deletes "that huge log file" - all they have done is removed the directory entry. Of course, there could be something else bizarre going on... nick@bis.com