Why is wtmp so big?

Viet Hoang vqh at drutx.ATT.COM
Fri Dec 8 03:07:17 AEST 1989


>From article <436 at khijol.UUCP>, by erc at khijol.UUCP (Edwin R. Carp):
> In article <413 at tabbs.UUCP> aris at tabbs.UUCP (Aris Stathakis) writes:
>>From article <1226 at ispi.UUCP>, by jbayer at ispi.UUCP (Jonathan Bayer):
>>
>>Since it is a binary file, this is no trivial task.
> 
> here's a piece of trivial code to do it:

Since it's trivial, we might as well do it with shell, assuming sizeof(utmp)
is 32 bytes and we want to keep 10 entries:
  tail -320c /etc/wtmp >/tmp/tmp.wtmp
  cp /tmp/tmp.wtmp /etc/wtmp

V. Hoang
vqh at att.com
-- 
V. Hoang, AT&T Denver, vqh at dwx3bn.att.com



More information about the Comp.unix.xenix mailing list