Lastlog Question..

Ron Wickersham rjw at alembic.com
Thu Aug 15 23:11:15 PDT 2002


hi Christopher,

i think you'll find that lastlog is not so big as it says it is.   it's a
sparse file indexed by the numeric UID, and it's a binary file with a single
entry for each userid.  it really doesn't grow with time so normally it's
not necessary to rotate it.  its reported size depends mostly on the actual 
UID's chosen and some systems have large numbers in there.  

the file size reported by ls -l is not accurate for the real lastlog since
its a sparse binary file, but if you copy the file then the copy really will 
take up all that space that it's reporting.  use du and see how much /var/adm
(for SunOS) has in it (or wherever lastlog is in your system). 

so normally you don't rotate lastlog but Eric's method (or something equally 
complex) is needed not to break the system should you decide to do so.   

-ron


On Thu, 15 Aug 2002, Christopher Wagner wrote:

> That's why I asked, I thought there would be a semi-complicated process for
> doing it.  Thanks Eric!!!
> 
> Any idea why it would be so big?  This system doesn't have many users on it,
> maybe 5 or 6 real users and the system users.
> 
> - Christopher Wagner



More information about the talk mailing list