LAST(1) COMMAND REFERENCE LAST(1)
NAME
last - indicate last logins of users and teletypes
SYNOPSIS
last [ -number ] [ -ffile ] [ ~ ] [ username... ] [ tty...
]
DESCRIPTION
Last prints records from the wtmp file of all logins and
logouts for users, teletypes, or any group of users and
teletypes. Arguments specify names of users or teletypes of
interest. If multiple arguments are given, the information
that applies to any of the arguments is printed. For
example `last root console' lists all of root's sessions as
well as all sessions on the console terminal.
Last with no arguments prints a record of all logins and
logouts, in reverse order. Last with the ~ argument prints
information about all shutdowns and reboots.
Names of teletypes may be given fully or abbreviated. For
example `last 0' is the same as `last tty0'.
Last prints 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, last so
indicates.
If last is interrupted, it indicates how far the search has
progressed in wtmp. If interrupted with a quit signal
(generated by a control-\) last indicates how far the search
has progressed and the search continues.
OPTIONS
-number
List the first number lines that match the specified
arguments. For example, last -3 bob lists the last three
logins for bob.
-ffile
Use file as login data base instead of /usr/adm/wtmp.
This option is often used to look at an old wtmp file
when wtmp file aging is used.
EXAMPLES
The following invocation lists the information described
above for the tty p6. The information provided is for users
that have logged onto the tty p6.
Printed 10/17/86 1
LAST(1) COMMAND REFERENCE LAST(1)
last p6
Since the pseudo-user reboot logs in at reboots of the
system, the command
last reboot
gives an indication of mean time between reboot.
FILES
/usr/adm/wtmp login data base
/usr/adm/shutdownlog which records shutdowns and reasons
for same
RETURN VALUE
[NO_ERRS] Command completed without error.
[P_ERR] A system error occurred. Execution
terminated. See intro(2) for more
information on system errors.
SEE ALSO
who(1n), finger(1n), wtmp(5).
Printed 10/17/86 2
%%index%%
na:72,86;
sy:158,220;
de:378,1566;
op:1944,545;
ex:2489,226;2859,223;
fi:3082,243;
rv:3325,306;
se:3631,146;
%%index%%000000000142