📄 utmp.5
字号:
.TH UTMP 5.SH NAMEutmp, wtmp \- logged in users, login and logout history.SH SYNOPSIS.nf.ft B#include <sys/types.h>#include <utmp.h>.SH DESCRIPTION.de SP.if t .sp 0.4.if n .sp..The files.B /etc/utmpand.B /usr/adm/wtmprespectively contain the currently logged in users, and the history oflogins and logouts..PPEach file is an array of the following structure defined in <utmp.h>:.PP.nf.ta +5n +15n +15nstruct utmp { char ut_user[8]; /* user name */ char ut_line[12]; /* terminal name */ char ut_host[16]; /* host name, when remote */ time_t ut_time; /* login/logout time */};.SP.ta +15n#define ut_name ut_user /* for compatibility with other systems */.fi.DT.PPThe structure contains more fields than those listed, but they are only ofinterest to.B initand.BR login .Note that the.B ut_namefield is a compatibility alias for.BR ut_user ,it is actually better to use it..PPA login entry is completely specified. A logout entry has a null string for.BR ut_name .A shutdown or reboot entry has an.B ut_linefield containing a "~" (tilde). The.B ut_namefield is usually the name of the program that did the shutdown, or "reboot"at reboot. This is a bit confusing, but note that there should always betwo such entries. If you see just one entry then the system has crashed, ifyou see two entries then the system was properly shut down and laterrebooted..SH FILES.TP 25n.B /etc/utmpCurrently logged in users..TP.B /usr/adm/wtmpHistory of logins and logouts..SH "SEE ALSO".BR who (1),.BR ttyslot (3)..SH AUTHORKees J. Bot (kjb@cs.vu.nl)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -