BSD 3 development
[unix-history] / usr / man / man5 / utmp.5
CommitLineData
e6817382
BJ
1.TH UTMP 5
2.SH NAME
3utmp, wtmp \- login records
4.SH SYNOPSIS
5.B #include <utmp.h>
6.SH DESCRIPTION
7The
8.I utmp
9file allows one to discover information about who is currently
10using UNIX.
11The file is a sequence of entries with the following
12structure declared in the include file:
13.RS
14.PP
15.nf
16.so /usr/include/utmp.h
17.fi
18.RE
19.PP
20This structure gives the name of the special file
21associated with the user's terminal, the user's login name,
22and the time of the login in the form of
23.IR time (2).
24.PP
25The
26.I wtmp
27file records all logins and logouts.
28Its format is exactly like
29.I utmp
30except that
31a null user name indicates a logout on the associated
32terminal.
33Furthermore, the terminal name `~' indicates that the
34system was rebooted at the indicated time;
35the adjacent pair of entries with terminal names
36`\^|\^' and `}' indicate the system-maintained time
37just before and just after a
38.I date
39command has changed the system's idea of the time.
40.PP
41.I Wtmp
42is maintained by
43.IR login (1)
44and
45.IR init (8).
46Neither of these programs creates the file,
47so if it is removed record-keeping is turned off.
48It is summarized by
49.IR ac (1).
50.SH FILES
51/etc/utmp
52.br
53/usr/adm/wtmp
54.SH "SEE ALSO"
55login(1), init(8), who(1), ac(1)