On Fri, Oct 17, 2008 at 09:44:43AM +0100, Chris Davies wrote:
> François Cerbelle <[EMAIL PROTECTED]> wrote:
> > you can "truncate" the file with the folowing bash line :
> > > /var/log/mail.err
> 
> > or the following portable line :
> > echo > /var/log/mail.err
> 
> Neither of those will work in this instance, as the file is held open
> for writing. On the next write, the data will be written into the file
> at the same place as if you hadn't truncated it (all the preceding data
> will appear to be NULLs).

Are you sure? The above method works fine for me.

> 
> Incidentally, "echo > x" writes a newline to the file, so it's not zero
> length. You might like to use ": > x" instead.

Right.

-- 
Tzafrir Cohen         | [EMAIL PROTECTED] | VIM is
http://tzafrir.org.il |                    | a Mutt's
[EMAIL PROTECTED] |                    |  best
ICQ# 16849754         |                    | friend


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to