Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Nov 2001 17:20:04 -0800 (PST)
From:      Cyrille Lefevre <clefevre@citeweb.net>
To:        freebsd-doc@freebsd.org
Subject:   Re: docs/31821: new FAQ: du/df
Message-ID:  <200111080120.fA81K3930717@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR docs/31821; it has been noted by GNATS.

From: Cyrille Lefevre <clefevre@citeweb.net>
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]
 > +           <para>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 <command>more</command>.  If you delete a file
 > +             while using <command>more</command> on it,
 > +             <command>more</command> doesn't immediately choke and
 > +             complain that it cannot view the file.  You cannot access
 > +             the file from anywhere except that <command>more</command>
 > +             window.  If the file is large enough,
 > +             <command>df</command> will show that it is gone.  The
                          ^^ du
 > +             space the file took up is now designated free.
 > +             <command>du</command> will show that it is still there, as
                          ^^ df
 > +             the space the file uses is still technically in use.  Once
 > +             you end the <command>more</command> session,
 > +             <command>du</command> and <command>df</command> will
 > +             agree.</para>
 > + 
 > +           <para>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!</para>
 > + 
 > +           <para>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 <filename>/var</filename>.
 > +             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;.</para>
                                     ^
                 never delete such file, but empty it by copying /dev/null
                 to it (cp /dev/null logfile) or
 > +         </answer>
 > +       </qandaentry>
 
 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111080120.fA81K3930717>