Subject: Re: Log rotation
To: Rhialto <rhialto@azenomei.knuffel.net>
From: David Laight <david@l8s.co.uk>
List: current-users
Date: 02/20/2005 18:50:07
On Sun, Feb 20, 2005 at 02:13:37AM +0100, Rhialto wrote:
> Also, isn't it the case that truncating the file does not reset the file
> pointer? So the next time an entry is logged in it, it is at the same
> place where it would have been otherwise, i.e. way past EOF and the
> empty space before it is simply filled with NULs.

Usually log files are written in append mode (ie opened with O_APPEND)
in which case the writes should be at the current EOF.
So truncating (ie ': >file' to many shells) will free up the space.

	David

-- 
David Laight: david@l8s.co.uk