Commit | Line | Data |
---|---|---|
4c0bb511 KB |
1 | .\" Copyright (c) 1980, 1990, 1993 |
2 | .\" The Regents of the University of California. All rights reserved. | |
e20828d9 | 3 | .\" |
a9b9c8f8 | 4 | .\" %sccs.include.redist.roff% |
7e45e5fb | 5 | .\" |
4c0bb511 | 6 | .\" @(#)last.1 8.1 (Berkeley) %G% |
e20828d9 | 7 | .\" |
d9d7a9f0 CL |
8 | .Dd |
9 | .Dt LAST 1 | |
10 | .Os BSD 4 | |
11 | .Sh NAME | |
12 | .Nm last | |
13 | .Nd indicate last logins of users and ttys | |
14 | .Sh SYNOPSIS | |
15 | .Nm last | |
a9b9c8f8 | 16 | .Op Fl Ns Ar n |
d9d7a9f0 CL |
17 | .Op Fl f Ar file |
18 | .Op Fl h Ar host | |
19 | .Op Fl t Ar tty | |
20 | .Op user ... | |
21 | .Sh DESCRIPTION | |
22 | .Nm Last | |
23 | will list the sessions of specified | |
24 | .Ar users , | |
25 | .Ar ttys , | |
26 | and | |
27 | .Ar hosts , | |
28 | in reverse time order. Each line of output contains | |
f619d373 KB |
29 | the user name, the tty from which the session was conducted, any |
30 | hostname, the start and stop times for the session, and the duration | |
31 | of the session. If the session is still continuing or was cut short by | |
d9d7a9f0 CL |
32 | a crash or shutdown, |
33 | .Nm last | |
34 | will so indicate. | |
35 | .Pp | |
a9b9c8f8 CL |
36 | .Bl -tag -width indent-two |
37 | .It Fl f Ar file | |
d9d7a9f0 CL |
38 | .Nm Last |
39 | reads the file | |
5325ced3 CL |
40 | .Ar file |
41 | instead of the default, | |
d9d7a9f0 | 42 | .Pa /var/log/wtmp . |
a9b9c8f8 CL |
43 | .It Fl Ar n |
44 | Limits the report to | |
45 | .Ar n | |
d9d7a9f0 | 46 | lines. |
a9b9c8f8 | 47 | .It Fl t Ar tty |
d9d7a9f0 CL |
48 | Specify the |
49 | .Ar tty . | |
a9b9c8f8 CL |
50 | Tty names may be given fully or abbreviated, for example, |
51 | .Dq Li "last -t 03" | |
52 | is | |
53 | equivalent to | |
54 | .Dq Li "last -t tty03" . | |
55 | .It Fl h Ar host | |
d9d7a9f0 CL |
56 | .Ar Host |
57 | names may be names or internet numbers. | |
a9b9c8f8 | 58 | .El |
d9d7a9f0 CL |
59 | .Pp |
60 | If | |
b6ef7299 | 61 | multiple arguments are given, the information which applies to any of the |
a9b9c8f8 CL |
62 | arguments is printed, e.g., |
63 | .Dq Li "last root -t console" | |
64 | would list all of | |
65 | .Dq Li root Ns 's | |
66 | sessions as well as all sessions on the console terminal. If no | |
d9d7a9f0 CL |
67 | users, hostnames or terminals are specified, |
68 | .Nm last | |
69 | prints a record of | |
b6ef7299 | 70 | all logins and logouts. |
d9d7a9f0 CL |
71 | .Pp |
72 | The pseudo-user | |
73 | .Ar reboot | |
74 | logs in at reboots of the system, thus | |
a9b9c8f8 CL |
75 | .Dq Li last reboot |
76 | will give an indication of mean time between reboot. | |
d9d7a9f0 CL |
77 | .Pp |
78 | If | |
79 | .Nm last | |
80 | is interrupted, it indicates to what date the search has | |
5325ced3 CL |
81 | progressed. If interrupted with a quit signal |
82 | .Nm last | |
d9d7a9f0 | 83 | indicates how |
f619d373 | 84 | far the search has progressed and then continues. |
d9d7a9f0 | 85 | .Sh FILES |
a9b9c8f8 CL |
86 | .Bl -tag -width /var/log/wtmp -compact |
87 | .It Pa /var/log/wtmp | |
d9d7a9f0 | 88 | login data base |
a9b9c8f8 | 89 | .El |
d9d7a9f0 CL |
90 | .Sh SEE ALSO |
91 | .Xr lastcomm 1 , | |
92 | .Xr utmp 5 , | |
93 | .Xr ac 8 | |
94 | .Sh HISTORY | |
95 | .Nm Last | |
a9b9c8f8 CL |
96 | appeared in |
97 | .Bx 3.0 . |