Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Jul 2002 10:12:35 -0400 (EDT)
From:      Jerry McAllister <jerrymc@clunix.cl.msu.edu>
To:        grant.cooper@nucleus.com (Grant Cooper)
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: log files
Message-ID:  <200207221412.g6MECZQ27006@clunix.cl.msu.edu>
In-Reply-To: <009901c2312c$b5c6ec70$2afececd@TCOOPER> from "Grant Cooper" at Jul 21, 2002 09:06:00 PM

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> I think I made a boo boo. I deleted all the files from var/log thinking I
> would have clean logs. Well, I rebooted but some of the files never
> reapeared. I made a back up just in case.
> 
> Can I expect any problems in the future?

Problems like no logs being writen maybe.
Some things take the absense of a log file as a signal to
not write log entries.  I doubt that anything critical does
it that way.

> What is the best way to start off with new logs - I'm experimenting with
> different things? Thus, trying to get more in touch with my new friend. Some
> of the files reappeared. In general is this a good way of starting off from
> fresh?

What we usually do is:  first observe the ownership (UID and GID) and
the permissions on the log file.  Then mv(1) the file to an alternate
name, usually with the date in the name and either touch(1) the file
and fix up the owner and permissions or do something like cp(1) /dev/null
to the name and fix up owners and permissions.   

I won't guarantee that will cover all situations, and maybe it is
a little crude(??) but it seems to work.   We have lots of things
that roll over logs using this procedure by age or by size of the 
log file.  We use a cron(8) job to check them periodically.  I think 
some things also have built-in checks for log file size.

////jerry

> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
> 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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