2 .\" Copyright 1989 AT&T
3 .\" Copyright (c) 2004 Sun Microsystems, Inc. All Rights Reserved.
4 .\" Copyright (c) 2017 Olaf Bohlen
5 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
6 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
7 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
8 .TH LAST 1 "Apr 12, 2017"
10 last \- display login and logout information about users and terminals
14 \fBlast\fR [\fB-a\fR] [\fB-l\fR] [\fB-n\fR \fInumber\fR | \fB-number\fR] [\fB-f\fR \fIfilename\fR]
15 [\fIname\fR | \fItty\fR]...
20 The \fBlast\fR command looks in the \fB/var/log/wtmpx\fR file, which records
21 all logins and logouts, for information about a user, a terminal, or any group
22 of users and terminals. Arguments specify names of users or terminals of
23 interest. If multiple arguments are given, the information applicable to any of
24 the arguments is printed. For example, \fBlast\fR \fBroot\fR \fBconsole\fR
25 lists all of root's sessions, as well as all sessions on the console terminal.
26 \fBlast\fR displays the sessions of the specified users and terminals, most
27 recent first, indicating the times at which the session began, the duration of
28 the session, and the terminal on which the session took place. \fBlast\fR also
29 indicates whether the session is continuing or was cut short by a reboot.
32 The pseudo-user reboot logs in when the system is shutdown and when it reboots.
44 gives an approximate record of when the operating system instance was shutdown
45 and when it rebooted. This can be used to calculate the availability of the
46 operating system over time.
49 \fBlast\fR with no arguments displays a record of all logins and logouts, in
53 If \fBlast\fR is interrupted, it indicates how far the search has progressed in
54 \fB/var/log/wtmpx\fR. If interrupted with a quit signal (generated by a
55 CTRL\(mi\e), \fBlast\fR indicates how far the search has progressed, and then
59 The following options are supported:
66 Displays the hostname in the last column.
75 Displays timestamps with seconds and years.
81 \fB\fB-f\fR\fI filename\fR\fR
84 Uses \fIfilename\fR as the name of the accounting file instead of
91 \fB\fB-n\fR\fI number\||\|\fR\fB-\fR\fInumber\fR\fR
94 Limits the number of entries displayed to that specified by \fInumber\fR. These
95 options are identical; the \fB-\fR\fInumber\fR option is provided as a
96 transition tool only and is removed in future releases.
99 .SH ENVIRONMENT VARIABLES
101 Date and time format is based on locale specified by the \fBLC_ALL\fR,
102 \fBLC_TIME\fR, or \fBLANG\fR environments, in that order of priority.
106 \fB\fB/var/log/wtmpx\fR\fR
114 \fButmpx\fR(4), \fBattributes\fR(5)