rt
|
因为/etc/wtmp 就不是文本格式
see:
man wtmp
|
什么系统?solaris可以用/usr/lib/acct/fwtmp看。
cat /var/adm/wtmpx | /usr/lib/acct/fwtmp | more
|
编程序呗
man wtmp
NAME
utmp, wtmp - login records
SYNOPSIS
#include
DESCRIPTION
The utmp file allows one to discover information about who is currently
using the system. There may be more users currently using the system,
because not all programs use utmp logging.
Warning: utmp must not be writable, because many system programs (fool-
ishly) depend on its integrity. You risk faked system logfiles and
modifications of system files if you leave utmp writable to any user.
The file is a sequence of entries with the following structure declared
in the include file (note that this is only one of several definitions
around; details depend on the version of libc):