Overflowing wtmp

Root Boy Jim rbj at uunet.UU.NET
Wed Jan 30 16:49:15 AEST 1991


In article <338 at alchemy.UUCP> bbs at 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 <rbj at uunet.uu.net>
	Close the gap of the dark year in between



More information about the Comp.unix.admin mailing list