Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!rbj From: rbj@uunet.UU.NET (Root Boy Jim) Newsgroups: comp.unix.admin Subject: Re: Overflowing wtmp Keywords: solution, C, mail me for a copy Message-ID: <120587@uunet.UU.NET> Date: 30 Jan 91 05:49:15 GMT References: <92@tdatirv.UUCP> <705@camco.Celestial.COM> <338@alchemy.UUCP> Organization: UUNET Communications Services, Falls Church, VA Lines: 23 In article <338@alchemy.UUCP> bbs@alchemy.UUCP (BBS Administration) writes: >a copy of my "wsize" program... >... I run it as a "root" crontask on the 1st and 15th >of every month and trim it so only the most recent 2500 records are >retained. It comes with a manual page, makefile, and one C program. Tsk tsk, overkill. Howabout a range of 2000 to 3000 records? Try #! /bin/sh cd /usr/adm split wtmp set x?? /dev/null /dev/null /dev/null /dev/null shift `expr $# - 3` cat $* > xxx mv xxx wtmp rm -f x?? >John Donahue, Senior Partner | UUCP: ucrmath!alchemy!{bbs, gumby} | The Future > Alchemy Software Designs | INET: {bbs, gumby}@alchemy.UUCP | Begins Now -- Root Boy Jim Cottrell Close the gap of the dark year in between