On Fri, Aug 25, 2000 at 10:37:39PM -0700, Rogue Eagle wrote:
[Re: nameless file taking up space]
> As I mentioned above, everything is fine now, but I'd
> still like to know why this happens.
On Unix, when a file has no links left (i.e., no names point to it),
the inode is not deleted until the last descriptor to it is closed,
and hence it still takes up space. However, since no names refer to
it, du(1) won't account for it.
Try this for yourself, assuming you use a Bourne-compatible shell
(type this as three lines):
while sleep 5
do dd if=/dev/zero bs=1024 count=1
done >testing 2>/dev/null & rm testing
Sit and wait, and watch disk usage grow. It will write 1 kilobyte every
5 seconds. After you kill the process, you will get the space back.
Yes, it's off topic, but I thought I'd explain it anyhow.
---Chris K.
--
Chris, the Young One |_ If you can't afford a backup system, you can't
Auckland, New Zealand |_ afford to have important data on your computer.
http://cloud9.hedgee.com/ |_ ---Tracy R. Reed