From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,271c3c51c4f7c28f X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2003-01-14 20:28:25 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!news-out.cwix.com!newsfeed.cwix.com!newsfeed1.cidera.com!Cidera!cyclone1.gnilink.net!spamfinder.gnilink.net!nwrddc01.gnilink.net.POSTED!53ab2750!not-for-mail From: "Nico Kadel-Garcia" Newsgroups: comp.unix.tru64 References: <3E2355D6.794B@maths.usyd.edu.au> Subject: Re: trimming wtmp X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: Date: Wed, 15 Jan 2003 04:28:18 GMT NNTP-Posting-Host: 151.203.22.73 X-Complaints-To: abuse@verizon.net X-Trace: nwrddc01.gnilink.net 1042604898 151.203.22.73 (Tue, 14 Jan 2003 23:28:18 EST) NNTP-Posting-Date: Tue, 14 Jan 2003 23:28:18 EST Xref: archiver1.google.com comp.unix.tru64:9387 "Paul Szabo" wrote in message news:3E2355D6.794B@maths.usyd.edu.au... > Daniel Berger wrote: > > Is there a way to trim wtmp? Mine goes back years and has gotten huge. > > What we do, yearly, is (at a quiet time): > > cp -ip /usr/adm/wtmp /usr/adm/wtmp.2002 > echo -n '' > /usr/adm/wtmp > > so the system has a nice, small (empty) file to fill up again. Log rotation is an art form. Take a look at this approach: mv /usr/adm/wtmp /usr/adm/wtmp.{backup name} kill -HUP {syslog process ID} This way, you restart the syslog daemon correctly and the data continues to pour into the file descriptor of the original file even in its new location until you restart it.