当前位置: 技术问答>linux和unix
请教:如何看/etc/wtmp的內容,打开都是乱码
来源: 互联网 发布时间:2015-04-15
本文导语: rt | 因为/etc/wtmp 就不是文本格式 see: man wtmp | 什么系统?solaris可以用/usr/lib/acct/fwtmp看。 cat /var/adm/wtmpx | /usr/lib/acct/fwtmp | more | 编程序呗 man wtmp NAME ...
rt
|
因为/etc/wtmp 就不是文本格式
see:
man wtmp
see:
man wtmp
|
什么系统?solaris可以用/usr/lib/acct/fwtmp看。
cat /var/adm/wtmpx | /usr/lib/acct/fwtmp | more
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):
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):