]>
Commit | Line | Data |
---|---|---|
6dbe3af9 KZ |
1 | .TH LAST 1 "20 March 1992" |
2 | .SH NAME | |
3 | last \(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 | |
22 | and logouts for information about a user, a teletype or any group of | |
23 | users and teletypes. Arguments specify names of users or teletypes of | |
24 | interest. If multiple arguments are given, the information which | |
25 | applies to any of the arguments is printed. For example ``\fBlast root | |
26 | console\fP'' would list all of root's sessions as well as all sessions | |
27 | on the console terminal. \fBLast\fP displays the sessions of the | |
28 | specified users and teletypes, most recent first, indicating the times | |
29 | at which the session began, the duration of the session, and the | |
30 | teletype which the session took place on. If the session is still | |
31 | continuing or was cut short by a reboot, \fBlast\fP so indicates. | |
32 | .LP | |
33 | The 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 | |
36 | logouts, in reverse order. | |
37 | .LP | |
38 | If \fBlast\fP is interrupted, it indicates how far the search has | |
39 | progressed in \fBwtmp\fP. If interrupted with a quit signal \fBlast\fP | |
40 | indicates how far the search has progressed so far, and the search | |
41 | continues. | |
42 | .SH OPTIONS | |
43 | .IP \fB\-\fP\fInumber\fP | |
44 | limit the number of entries displayed to that specified by \fInumber\fP. | |
45 | .IP "\fB\-f\fP \fIfilename\fP" | |
46 | Use \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" |
49 | List only logins from \fIhostname\fP. | |
dfa815f9 | 50 | .IP "\fB\-i\fP \fIIP address\fP" |
6dbe3af9 KZ |
51 | List only logins from \fIIP address\fP. |
52 | .IP "\fB\-l\fP" | |
53 | List IP addresses of remote hosts instead of truncated host names. | |
54 | .IP "\fB\-t\fP \fItty\fP" | |
55 | List only logins on \fItty\fP. | |
56 | .IP "\fB\-y\fP" | |
57 | Also report year of dates. | |
58 | .SH FILES | |
726f69e2 | 59 | /var/log/wtmp \(em login data base |
86d62711 | 60 | .SH AVAILABILITY |
601d12fb KZ |
61 | The last command is part of the util-linux package and is available from |
62 | ftp://ftp.kernel.org/pub/linux/utils/util-linux/. |