Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!usc!rutgers!att!drutx!vqh From: vqh@drutx.ATT.COM (Viet Hoang) Newsgroups: comp.unix.xenix Subject: Re: Why is wtmp so big? Message-ID: <4628@drutx.ATT.COM> Date: 7 Dec 89 16:07:17 GMT References: <436@khijol.UUCP> Organization: AT&T, Denver, CO Lines: 17 From article <436@khijol.UUCP>, by erc@khijol.UUCP (Edwin R. Carp): > In article <413@tabbs.UUCP> aris@tabbs.UUCP (Aris Stathakis) writes: >>From article <1226@ispi.UUCP>, by jbayer@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@att.com -- V. Hoang, AT&T Denver, vqh@dwx3bn.att.com