From owner-freebsd-doc Wed Nov 7 17:20:11 2001 Delivered-To: freebsd-doc@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 0973237B405 for ; Wed, 7 Nov 2001 17:20:04 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id fA81K3930717; Wed, 7 Nov 2001 17:20:04 -0800 (PST) (envelope-from gnats) Date: Wed, 7 Nov 2001 17:20:04 -0800 (PST) Message-Id: <200111080120.fA81K3930717@freefall.freebsd.org> To: freebsd-doc@freebsd.org Cc: From: Cyrille Lefevre Subject: Re: docs/31821: new FAQ: du/df Reply-To: Cyrille Lefevre Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR docs/31821; it has been noted by GNATS. From: Cyrille Lefevre To: mwlucas@blackhelicopters.org Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: docs/31821: new FAQ: du/df Date: Thu, 8 Nov 2001 02:14:57 +0100 (CET) mwlucas@blackhelicopters.org wrote: [snip] > + When a program has a file open, and you delete the > + file, it isn't really deleted until the program releases > + the file. You can see this easily enough with a program > + such as more. If you delete a file > + while using more on it, > + more doesn't immediately choke and > + complain that it cannot view the file. You cannot access > + the file from anywhere except that more > + window. If the file is large enough, > + df will show that it is gone. The ^^ du > + space the file took up is now designated free. > + du will show that it is still there, as ^^ df > + the space the file uses is still technically in use. Once > + you end the more session, > + du and df will > + agree. > + > + Note that softupdates can delay the freeing of disk > + space; you might need to wait up to 30 seconds for the > + change to be visible! > + > + This situation is common on web servers. Many people > + set up a FreeBSD web server and forget to rotate the log > + files. The access log fills up /var. > + The new administrator deletes the file, but the system > + still complains that the partition is full. Stopping and > + restarting the web server program would free the file, > + allowing the system to release the disk space. To prevent > + this from happening, set up &man.newsyslog.8;. ^ never delete such file, but empty it by copying /dev/null to it (cp /dev/null logfile) or > + > + Cyrille. -- Cyrille Lefevre mailto:clefevre@citeweb.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message