From: Brian Haley <Brian.Haley@nospam_hp.com>
Subject: Re: Last command output format
Date: Fri, 27 Feb 2004 22:51:14 GMT [thread overview]
Message-ID: <CRP%b.1269$4H1.545@news.cpqcorp.net> (raw)
In-Reply-To: <c1ntrl$1q6l$1@jeeves.eng.abbnm.com>
Peter da Silva wrote:
> struct utmp {
> char ut_user[32]; /* User login name */
> char ut_id[14]; /* /etc/inittab id- IDENT_LEN in init */
> char ut_line[32]; /* device name (console, lnxx) */
> short ut_type; /* type of entry */
> [...]
> time_t ut_time; /* time entry was made */
> char ut_host[64]; /* host name same as MAXHOSTNAMELEN */
> };
This was changed to 256 some time ago (1997 ?).
>>The host field is truncated to 16 char where in fact it is a 256 char
>>field. My host names are longer than 16 characters.
The 'last' command uses a %16s modifier to print the hostname, probably
to make a nice table. Perhaps you could open a problem report to add a
flag (-l for long) to print the full name? It might be hard to change
the default since that might break someone else's existing script.
Or perhaps you are feeling daring and want to pull the FreeBSD source
for last.c and modify it :)
-Brian
prev parent reply other threads:[~2004-02-27 22:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-26 14:31 Last command output format Claude
2004-02-27 17:13 ` Peter da Silva
2004-02-27 22:51 ` Brian Haley [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox