Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!elroy.jpl.nasa.gov!ncar!csn!spot.Colorado.EDU!skwu From: skwu@spot.Colorado.EDU (WU SHI-KUEI) Newsgroups: comp.unix.admin Subject: Re: Overflowing wtmp Message-ID: <1991Jan29.182320.1489@csn.org> Date: 29 Jan 91 18:23:20 GMT References: <92@tdatirv.UUCP> <705@camco.Celestial.COM> Sender: news@csn.org (news) Organization: University of Colorado, Boulder Lines: 31 Nntp-Posting-Host: spot.colorado.edu In article <705@camco.Celestial.COM> bill@camco.Celestial.COM (Bill Campbell) writes: >In <92@tdatirv.UUCP> sarima@tdatirv.UUCP (Stanley Friesen) writes: > > >>OK, now for a silly question. Not at all silly > >>I am the adminsitrator of a SCO Xenix/286 system, and the system administrator >>documentation is rather limited. > > >>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). >>-- >>--------------- >>uunet!tdatirv!sarima (Stanley Friesen) > >This usually is caused by a flakey terminal connection, bad >ground or some such. ...... If the complaint were about '/etc/utmp', Bill Campbell's analysis might well be correct. However, '/etc/wtmp' will grow forever on every system, and cat /dev/null > /etc/wtmp is as good as any other. I suppose one could read the whole file, close it, then re-open it and write only the last N structures as shown in Section 4 back. But why bother??