1 '\" -*- coding: UTF-8 -*-
2 .\" Copyright (C) 1998-2004 Miquel van Smoorenburg.
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.
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.
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
20 .TH LAST,LASTB 1 "Jul 31, 2004" "" "Linux System Administrator's Manual"
24 last, lastb \- show listing of last logged in users
31 .RB "[ \-\fBn\fP \fInum\fP ]"
33 .RB "[ \-\fBf\fP \fIfile\fP ]"
34 .RB "[ \-\fBt\fP \fIYYYYMMDDHHMMSS\fP ]"
41 .RB "[ \-\fBn\fP \fInum\fP ]"
42 .RB "[ \-\fBf\fP \fIfile\fP ]"
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.
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.
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
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.
71 .IP "\fB\-f\fP \fIfile\fP"
72 Tells \fBlast\fP to use a specific file instead of \fB/var/log/wtmp\fP.
74 This is a count telling \fBlast\fP how many lines to show.
75 .IP "\fB\-n\fP \fInum\fP"
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
83 Suppresses the display of the hostname field.
85 Display the hostname in the last column. Useful in combination
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
92 Print full login and logout times and dates.
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.
97 Read an old-type wtmp file (written by linux-libc5 applications).
99 Display full user and domain names in the output.
101 Display the system shutdown entries and run level changes.
104 The files \fIwtmp\fP and \fIbtmp\fP might not be found. The system only
105 logs information in these files if they are present. This is a local
106 configuration issue. If you want the files to be used, they can be
107 created with a simple \fBtouch\fP(1) command (for example,
108 \fItouch /var/log/wtmp\fP).
117 Miquel van Smoorenburg, miquels@cistron.nl