date and time created 88/03/30 15:58:41 by bostic
[unix-history] / usr / src / usr.bin / last / last.1
CommitLineData
e20828d9
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
b6ef7299 5.\" @(#)last.1 6.3 (Berkeley) %G%
e20828d9 6.\"
d6370649 7.TH LAST 1 ""
e20828d9
KM
8.UC 4
9.SH NAME
f619d373 10last \- indicate last logins of users and ttys
e20828d9 11.SH SYNOPSIS
b6ef7299 12\fBlast\fP [-#] [-f file] [-h host] [-t tty] [user ...]
e20828d9 13.SH DESCRIPTION
f619d373
KB
14\fILast\fP will list the sessions of specified \fIusers,\fP \fIttys,\fP
15and \fIhosts,\fP in reverse time order. Each line of output contains
16the user name, the tty from which the session was conducted, any
17hostname, the start and stop times for the session, and the duration
18of the session. If the session is still continuing or was cut short by
b6ef7299 19a crash or shutdown, \fIlast\fP will so indicate.
e20828d9 20.PP
b6ef7299
KB
21\fILast\fP reads the file \fIfile\fP, or by default, \fI/usr/adm/wtmp\fP.
22The \fB-#\fP option limits the report to \fB#\fP lines.
f619d373
KB
23.PP
24Other arguments specify \fIusers,\fP \fIttys\fP or \fIhosts\fP of interest.
b6ef7299
KB
25Tty names may be given fully or abbreviated, e.g., ``last -t 03'' is
26equivalent to ``last -t tty03''. Host names may be internet numbers. If
27multiple arguments are given, the information which applies to any of the
28arguments is printed, e.g., ``last root -t console'' would list all of
29``root's'' sessions as well as all sessions on the console terminal. If no
30users, hostnames or terminals are specified, \fIlast\fP prints a record of
31all logins and logouts.
f619d373
KB
32.PP
33The pseudo-user \fBreboot\fP logs in at reboots of the system, thus
b6ef7299 34``last reboot'' will give an indication of mean time between reboot.
e20828d9 35.PP
f619d373
KB
36If \fIlast\fP is interrupted, it indicates to what date the search has
37progressed. If interrupted with a quit signal \fIlast\fP indicates how
38far the search has progressed and then continues.
e20828d9
KM
39.SH FILES
40/usr/adm/wtmp login data base
41.br
f619d373
KB
42.SH "SEE ALSO"
43lastcomm(1), utmp(5), ac(8)