[Pkg-shadow-devel] /var/log/lastlog

Mike Frysinger vapier at gentoo.org
Mon Apr 13 21:24:47 UTC 2009


On Monday 13 April 2009 16:49:36 Jon Grant wrote:
> Mike Frysinger wrote on 13/04/09 12:51:
> > On Monday 13 April 2009 07:10:56 Jon Grant wrote:
> >> just noticed that /var/log/lastlog is a binary file. I wondered if it
> >> could be made a text file so it was freely readable by normal text
> >> tools?
> >
> > and break backwards compatibility for no real reason ?  that doesnt sound
> > like a good idea.
>
> You make a good point. Do other UNIX have the same binary format for
> lastlog though? if so it's only backwards compatible within the same
> development of lastlog.

the file is also sparsely written.  do you really expect to use text files 
like `grep` to troll through a sparse 1.2TB file ?  g'luck with that.

> > parsing a text db format is just as easy as parsing the output of
> > lastlog.
>
> yes, it's possible to parse the dump, but this isn't really the unix
> convention. messages, syslog, mtab, Xorg.0.log are all text format, so
> I'm not sure how lastlog ended up as binary.

those arent really the same thing.  it'd be more appropriate to compare 
lastlog to utmp/wtmp which are binary only files.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/attachments/20090413/b0960599/attachment.pgp>


More information about the Pkg-shadow-devel mailing list