Sorry, sent too soon.

Generally, you want to look at something like 'logrotate' for managing
your /var/log directory instead of directly messing with the log
files.

Fuzzy

On 3/7/06, Fuzzy Logic <[EMAIL PROTECTED]> wrote:

> If a process is holding an open file handle, this will happen.
>
> Fuzzy
>
> On 3/7/06, Brandon S. Darbro <[EMAIL PROTECTED]> wrote:
>
> > I've run into this many times on Linux and I've finally decided I would
> > like to know why.
> >
> > If I truncate a logfile, say snmpd.log, with say:
> >
> > cat /dev/null > /var/log/snmp/snmpd.log
> >
> > It will result in a file size of 0 bytes...  but the very next time the
> > process that holds it open write data to it, boom, the file is huge
> > again.  The head of the file will be nulls until it reaches the new data
> > at the end.
> >
> > Why is this?  On other unix's, when I zero a file, it grows slowly back
> > up from zero... not jumping back up to it's previous size and then
> > appending.
> >
> > *Brandon Darbro

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to