LAST(1) BSD LAST(1)
NAME
last - indicate last logins of users and teletypes
SYNOPSIS
last [ -N ] [ name ... ] [ tty ... ]
DESCRIPTION
last looks in the wtmp file (which records all logins and logouts) for
information about a user, a teletype, or any group of users and
teletypes. Arguments specify users' names or teletypes of interest. You
can specify teletype names fully, or abbreviate them. For example, "last
0" is the same as "last tty0". If you specify multiple arguments, last
prints the information that applies to any of the arguments.
last prints the sessions of the specified users and teletypes, most
recent first, indicating the time the session began, the duration of the
session, and the teletype the session took place on. If the session is
still continuing or was cut short by a reboot, last so indicates.
The pseudo-user reboot logs in at reboots of the system, thus
last reboot
gives an indication of mean time between reboots.
If you don't specify an argument, last prints a record of all logins and
logouts, in reverse order. Specify -N to limit the report to N lines.
If last is interrupted, it indicates how far the search has progressed in
wtmp. If interrupted with a quit signal (usually generated by a CTRL-\)
last indicates how far the search has progressed so far, and continues
the search.
EXAMPLES
The following command lists all of root's sessions as well as all
sessions on the console terminal.
last root console
FILES
/usr/adm/wtmp Log-in database
/usr/adm/shutdownlog Records shutdowns and the reasons for them
SEE ALSO
lastcomm(1), wtmp(5), ac(8)