blob: 314e5d9dcd0861a59acc5e6af245252a5744cd7f [file] [log] [blame]
.TH LAST 1 "20 March 1992"
last \(em indicate last logins by user or terminal
.ad l
.B last
.RB [ \-\fP\fInumber\fP ]
.RB [ \-f
.IR filename ]
.RB [ \-t
.IR tty ]
.RB [ \-h
.IR hostname ]
.RB [ \-i
.IR address ]
.RB [ \-l ]
.RB [ \-y ]
.RI [ name ...]
.ad b
\fBLast\fP looks back in the \fBwtmp\fP file which records all logins
and logouts for information about a user, a teletype or any group of
users and teletypes. Arguments specify names of users or teletypes of
interest. If multiple arguments are given, the information which
applies to any of the arguments is printed. For example ``\fBlast root
console\fP'' would list all of root's sessions as well as all sessions
on the console terminal. \fBLast\fP displays the sessions of the
specified users and teletypes, most recent first, indicating the times
at which the session began, the duration of the session, and the
teletype which the session took place on. If the session is still
continuing or was cut short by a reboot, \fBlast\fP so indicates.
The pseudo-user \fBreboot\fP logs in at reboots of the system.
\fBLast\fP with no arguments displays a record of all logins and
logouts, in reverse order.
If \fBlast\fP is interrupted, it indicates how far the search has
progressed in \fBwtmp\fP. If interrupted with a quit signal \fBlast\fP
indicates how far the search has progressed so far, and the search
.IP \fB\-\fP\fInumber\fP
limit the number of entries displayed to that specified by \fInumber\fP.
.IP "\fB\-f\fP \fIfilename\fP"
Use \fIfilename\fP as the name of the accounting file instead of
.BR /var/log/wtmp .
.IP "\fB\-h\fP \fIhostname\fP"
List only logins from \fIhostname\fP.
.IP "\fB\-i\fP \fIIP address\fP"
List only logins from \fIIP address\fP.
.IP "\fB\-l\fP"
List IP addresses of remote hosts instead of truncated host names.
.IP "\fB\-t\fP \fItty\fP"
List only logins on \fItty\fP.
.IP "\fB\-y\fP"
Also report year of dates.
/var/log/wtmp \(em login data base
The last command is part of the util-linux-ng package and is available from