Path: utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!mips!daver!kcdev!genco!rad From: rad@genco.bungi.com (Bob Daniel) Newsgroups: comp.unix.admin Subject: Re: Overflowing wtmp Message-ID: <221@genco.bungi.com> Date: 23 Jan 91 19:08:42 GMT References: <92@tdatirv.UUCP> Reply-To: rad@genco.bungi.com (Bob Daniel) Organization: Gentry & Assoc. Excelsior Springs, MO Lines: 14 In article <92@tdatirv.UUCP> sarima@tdatirv.UUCP (Stanley Friesen) writes: > >I have found that my wtmp file tends to grow without bound. >This is annoying. Is there any clean way to trim it, short of the rather >crude 'cat /dev/null > /etc/wtmp' approach. (I *do* know about cron, >I just need to know what to put in it). First of all, you only need to use '>/etc/wtmp' to clear out the file. To install it in cron, make this entry in /usr/spool/cron/crontabs/root... 0 2 * * 0 >/etc/wtmp Restart the cron or just reboot the system. This will clear the file at 2 AM every Sunday.