Annotation of src/usr.bin/last/last.1, Revision 1.2
1.2 ! deraadt 1: .\" $OpenBSD: last.1,v 1.3 1994/12/21 22:41:23 jtc Exp $
1.1 deraadt 2: .\" $NetBSD: last.1,v 1.3 1994/12/21 22:41:23 jtc Exp $
3: .\"
4: .\" Copyright (c) 1980, 1990, 1993
5: .\" The Regents of the University of California. All rights reserved.
6: .\"
7: .\" Redistribution and use in source and binary forms, with or without
8: .\" modification, are permitted provided that the following conditions
9: .\" are met:
10: .\" 1. Redistributions of source code must retain the above copyright
11: .\" notice, this list of conditions and the following disclaimer.
12: .\" 2. Redistributions in binary form must reproduce the above copyright
13: .\" notice, this list of conditions and the following disclaimer in the
14: .\" documentation and/or other materials provided with the distribution.
15: .\" 3. All advertising materials mentioning features or use of this software
16: .\" must display the following acknowledgement:
17: .\" This product includes software developed by the University of
18: .\" California, Berkeley and its contributors.
19: .\" 4. Neither the name of the University nor the names of its contributors
20: .\" may be used to endorse or promote products derived from this software
21: .\" without specific prior written permission.
22: .\"
23: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33: .\" SUCH DAMAGE.
34: .\"
35: .\" @(#)last.1 8.1 (Berkeley) 6/6/93
36: .\"
37: .Dd June 6, 1993
38: .Dt LAST 1
39: .Os BSD 4
40: .Sh NAME
41: .Nm last
42: .Nd indicate last logins of users and ttys
43: .Sh SYNOPSIS
44: .Nm last
45: .Op Fl Ns Ar n
46: .Op Fl f Ar file
47: .Op Fl h Ar host
48: .Op Fl t Ar tty
49: .Op user ...
50: .Sh DESCRIPTION
51: .Nm Last
52: will list the sessions of specified
53: .Ar users ,
54: .Ar ttys ,
55: and
56: .Ar hosts ,
57: in reverse time order. Each line of output contains
58: the user name, the tty from which the session was conducted, any
59: hostname, the start and stop times for the session, and the duration
60: of the session. If the session is still continuing or was cut short by
61: a crash or shutdown,
62: .Nm last
63: will so indicate.
64: .Pp
65: .Bl -tag -width indent-two
66: .It Fl f Ar file
67: .Nm Last
68: reads the file
69: .Ar file
70: instead of the default,
71: .Pa /var/log/wtmp .
72: .It Fl Ar n
73: Limits the report to
74: .Ar n
75: lines.
76: .It Fl t Ar tty
77: Specify the
78: .Ar tty .
79: Tty names may be given fully or abbreviated, for example,
80: .Dq Li "last -t 03"
81: is
82: equivalent to
83: .Dq Li "last -t tty03" .
84: .It Fl h Ar host
85: .Ar Host
86: names may be names or internet numbers.
87: .El
88: .Pp
89: If
90: multiple arguments are given, the information which applies to any of the
91: arguments is printed, e.g.,
92: .Dq Li "last root -t console"
93: would list all of
94: .Dq Li root Ns 's
95: sessions as well as all sessions on the console terminal. If no
96: users, hostnames or terminals are specified,
97: .Nm last
98: prints a record of
99: all logins and logouts.
100: .Pp
101: The pseudo-user
102: .Ar reboot
103: logs in at reboots of the system, thus
104: .Dq Li last reboot
105: will give an indication of mean time between reboot.
106: .Pp
107: If
108: .Nm last
109: is interrupted, it indicates to what date the search has
110: progressed. If interrupted with a quit signal
111: .Nm last
112: indicates how
113: far the search has progressed and then continues.
114: .Sh FILES
115: .Bl -tag -width /var/log/wtmp -compact
116: .It Pa /var/log/wtmp
117: login data base
118: .El
119: .Sh SEE ALSO
120: .Xr lastcomm 1 ,
121: .Xr utmp 5 ,
122: .Xr ac 8
123: .Sh HISTORY
124: .Nm Last
125: appeared in
126: .Bx 3.0 .