Drop hurd specific dependency on libc0.3 (>= 2.3.2.ds1-12). It is
[sysvinit.git] / man / last.1
1 '\" -*- coding: UTF-8 -*-
2 .\" Copyright (C) 1998-2004 Miquel van Smoorenburg.
3 .\"
4 .\" This program is free software; you can redistribute it and/or modify
5 .\" it under the terms of the GNU General Public License as published by
6 .\" the Free Software Foundation; either version 2 of the License, or
7 .\" (at your option) any later version.
8 .\"
9 .\" This program is distributed in the hope that it will be useful,
10 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
11 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 .\" GNU General Public License for more details.
13 .\"
14 .\" You should have received a copy of the GNU General Public License
15 .\" along with this program; if not, write to the Free Software
16 .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 .\"
18 .\"{{{}}}
19 .\"{{{ Title
20 .TH LAST,LASTB 1 "Jul 31, 2004" "" "Linux System Administrator's Manual"
21 .\"}}}
22 .\"{{{ Name
23 .SH NAME
24 last, lastb \- show listing of last logged in users
25 .\"}}}
26 .\"{{{ Synopsis
27 .SH SYNOPSIS
28 .B last
29 .RB [ \-R ]
30 .RB [ \-\fInum\fP ]
31 .RB "[ \-\fBn\fP \fInum\fP ]"
32 .RB [ \-adFiox ]
33 .RB "[ \-\fBf\fP \fIfile\fP ]"
34 .RB "[ \-\fBt\fP \fIYYYYMMDDHHMMSS\fP ]"
35 .RI [ name... ]
36 .RI [ tty... ]
37 .br
38 .B lastb
39 .RB [ \-R ]
40 .RB [ \-\fInum\fP ]
41 .RB "[ \-\fBn\fP \fInum\fP ]"
42 .RB "[ \-\fBf\fP \fIfile\fP ]"
43 .RB [ \-adFiox ]
44 .RI [ name... ]
45 .RI [ tty... ]
46 .\"}}}
47 .\"{{{ Description
48 .SH DESCRIPTION
49 .B Last
50 searches back through the file \fB/var/log/wtmp\fP (or the file
51 designated by the \fB\-f\fP flag) and displays a list of all
52 users logged in (and out) since that file was created. Names of users
53 and tty's can be given, in which case \fBlast\fP will show only those entries
54 matching the arguments. Names of ttys can be abbreviated, thus \fBlast
55 0\fP is the same as \fBlast tty0\fP.
56 .PP
57 When \fBlast\fP catches a \s-2SIGINT\s0 signal (generated by the interrupt key,
58 usually control-C) or a \s-2SIGQUIT\s0 signal (generated by the quit key,
59 usually control-\e), \fBlast\fP will show how far it has searched through the
60 file; in the case of the \s-2SIGINT\s0 signal \fBlast\fP will then terminate.
61 .PP
62 The pseudo user \fBreboot\fP logs in each time the system is rebooted.
63 Thus \fBlast reboot\fP will show a log of all reboots since the log file
64 was created.
65 .PP
66 \fBLastb\fP is the same as \fBlast\fP, except that by default it shows a log
67 of the file \fB/var/log/btmp\fP, which contains all the bad login attempts.
68 .\"}}}
69 .\"{{{ Options
70 .SH OPTIONS
71 .IP "\fB\-f\fP \fIfile\fP"
72 Tells \fBlast\fP to use a specific file instead of \fB/var/log/wtmp\fP.
73 .IP \fB\-\fP\fInum\fP
74 This is a count telling \fBlast\fP how many lines to show.
75 .IP "\fB\-n\fP \fInum\fP"
76 The same.
77 .IP "\fB\-t\fP \fIYYYYMMDDHHMMSS\fP"
78 Display the state of logins as of the specified time. This is
79 useful, e.g., to determine easily who was logged in at a particular
80 time -- specify that time with \fB\-t\fP and look for "still logged
81 in".
82 .IP \fB\-R\fP
83 Suppresses the display of the hostname field.
84 .IP \fB\-a\fP
85 Display the hostname in the last column. Useful in combination
86 with the next flag.
87 .IP \fB\-d\fP
88 For non-local logins, Linux stores not only the host name of the remote
89 host but its IP number as well. This option translates the IP number
90 back into a hostname.
91 .IP \fB\-F\fP
92 Print full login and logout times and dates.
93 .IP \fB\-i\fP
94 This option is like \fB-d\fP in that it displays the IP number of the remote
95 host, but it displays the IP number in numbers-and-dots notation.
96 .IP \fB\-o\fP
97 Read an old-type wtmp file (written by linux-libc5 applications).
98 .IP \fB\-x\fP
99 Display the system shutdown entries and run level changes.
100 .\"}}}
101 .SH NOTES
102 The files \fIwtmp\fP and \fIbtmp\fP might not be found. The system only
103 logs information in these files if they are present. This is a local
104 configuration issue. If you want the files to be used, they can be
105 created with a simple \fBtouch\fP(1) command (for example,
106 \fItouch /var/log/wtmp\fP).
107 .\"{{{ Files
108 .SH FILES
109 /var/log/wtmp
110 .br
111 /var/log/btmp
112 .\"}}}
113 .\"{{{ Author
114 .SH AUTHOR
115 Miquel van Smoorenburg, miquels@cistron.nl
116 .\"}}}
117 .\"{{{ See also
118 .SH "SEE ALSO"
119 .BR shutdown (8),
120 .BR login (1),
121 .BR init (8)
122 .\"}}}