]> git.ipfire.org Git - thirdparty/util-linux.git/blame - login-utils/last.1
rename util-linux-ng back to util-linux
[thirdparty/util-linux.git] / login-utils / last.1
CommitLineData
6dbe3af9
KZ
1.TH LAST 1 "20 March 1992"
2.SH NAME
3last \(em indicate last logins by user or terminal
4.SH SYNOPSIS
5.ad l
6.B last
7.RB [ \-\fP\fInumber\fP ]
8.RB [ \-f
9.IR filename ]
10.RB [ \-t
11.IR tty ]
12.RB [ \-h
13.IR hostname ]
14.RB [ \-i
15.IR address ]
16.RB [ \-l ]
17.RB [ \-y ]
18.RI [ name ...]
19.ad b
20.SH DESCRIPTION
21\fBLast\fP looks back in the \fBwtmp\fP file which records all logins
22and logouts for information about a user, a teletype or any group of
23users and teletypes. Arguments specify names of users or teletypes of
24interest. If multiple arguments are given, the information which
25applies to any of the arguments is printed. For example ``\fBlast root
26console\fP'' would list all of root's sessions as well as all sessions
27on the console terminal. \fBLast\fP displays the sessions of the
28specified users and teletypes, most recent first, indicating the times
29at which the session began, the duration of the session, and the
30teletype which the session took place on. If the session is still
31continuing or was cut short by a reboot, \fBlast\fP so indicates.
32.LP
33The pseudo-user \fBreboot\fP logs in at reboots of the system.
34.LP
35\fBLast\fP with no arguments displays a record of all logins and
36logouts, in reverse order.
37.LP
38If \fBlast\fP is interrupted, it indicates how far the search has
39progressed in \fBwtmp\fP. If interrupted with a quit signal \fBlast\fP
40indicates how far the search has progressed so far, and the search
41continues.
42.SH OPTIONS
43.IP \fB\-\fP\fInumber\fP
44limit the number of entries displayed to that specified by \fInumber\fP.
45.IP "\fB\-f\fP \fIfilename\fP"
46Use \fIfilename\fP as the name of the accounting file instead of
726f69e2 47.BR /var/log/wtmp .
6dbe3af9
KZ
48.IP "\fB\-h\fP \fIhostname\fP"
49List only logins from \fIhostname\fP.
dfa815f9 50.IP "\fB\-i\fP \fIIP address\fP"
6dbe3af9
KZ
51List only logins from \fIIP address\fP.
52.IP "\fB\-l\fP"
53List IP addresses of remote hosts instead of truncated host names.
54.IP "\fB\-t\fP \fItty\fP"
55List only logins on \fItty\fP.
56.IP "\fB\-y\fP"
57Also report year of dates.
58.SH FILES
726f69e2 59/var/log/wtmp \(em login data base
86d62711 60.SH AVAILABILITY
601d12fb
KZ
61The last command is part of the util-linux package and is available from
62ftp://ftp.kernel.org/pub/linux/utils/util-linux/.