*BSD News Article 13789


Return to BSD News archive

Newsgroups: comp.os.386bsd.questions
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!uwm.edu!wupost!dsuvax.dsu.edu!ghelmer
From: ghelmer@dsuvax.dsu.edu (Guy Helmer)
Subject: Re: Rotating the syslogs
Message-ID: <1993Mar31.161718.4449@dsuvax.dsu.edu>
Organization: Dakota State University
References: <1p77tt$rq3@usenet.INS.CWRU.Edu> <1993Mar30.194840.5890@sci34hub.sci.com>
Date: Wed, 31 Mar 1993 16:17:18 GMT
Lines: 19

In <1993Mar30.194840.5890@sci34hub.sci.com> gary@sci34hub.sci.com (Gary Heston) writes:

>In article <1p77tt$rq3@usenet.INS.CWRU.Edu> david@jake.EEAP.CWRU.Edu (David Nerenberg) writes:
>>I am trying to rotate my syslogs from cron.  The cron side of things
>>is fine.  Fir example, I move messages to messages.OLD and touch a 
>>new messages file.

>Don't. Copy messages to messages.OLD, then copy /dev/null into messages.

>This leaves the permissions, ownership, and inode number of the messages
>file intact; once copied, you can move messages.OLD any way you want
>without problems.

Doesn't that leave an opportunity to lose messages between the two copy
commands, though? 

-- 
Guy Helmer, Dakota State University Computing Services - ghelmer@dsuvax.dsu.edu