]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/last/last.1
unfinished sblive driver, playback/mixer only for now - not enabled in
[FreeBSD/FreeBSD.git] / usr.bin / last / last.1
1 .\" Copyright (c) 1980, 1990, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)last.1      8.1 (Berkeley) 6/6/93
33 .\" $FreeBSD$
34 .\"
35 .Dd June 6, 1993
36 .Dt LAST 1
37 .Os BSD 4
38 .Sh NAME
39 .Nm last
40 .Nd indicate last logins of users and ttys
41 .Sh SYNOPSIS
42 .Nm last
43 .Op Fl Ns Ar n
44 .Op Fl f Ar file
45 .Op Fl h Ar host
46 .Op Fl s
47 .Op Fl t Ar tty
48 .Op Fl w
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 Ar n
67 Limits the report to
68 .Ar n
69 lines.
70 .It Fl f Ar file
71 .Nm Last
72 reads the file
73 .Ar file
74 instead of the default,
75 .Pa /var/log/wtmp .
76 .It Fl h Ar host
77 .Ar Host
78 names may be names or internet numbers.
79 .It Fl s
80 Report the duration of the login session in seconds, instead of the
81 default days, hours and minutes.
82 .It Fl t Ar tty
83 Specify the
84 .Ar tty .
85 Tty names may be given fully or abbreviated, for example,
86 .Dq Li "last -t 03"
87 is
88 equivalent to
89 .Dq Li "last -t tty03" .
90 .It Fl w
91 Widen the duration field to show seconds, as well as the
92 default days, hours and minutes.
93 .El
94 .Pp
95 If
96 multiple arguments are given, the information which applies to any of the
97 arguments is printed, e.g.,
98 .Dq Li "last root -t console"
99 would list all of
100 .Dq Li root Ns 's
101 sessions as well as all sessions on the console terminal.
102 If no
103 users, hostnames or terminals are specified,
104 .Nm last
105 prints a record of
106 all logins and logouts.
107 .Pp
108 The pseudo-user
109 .Ar reboot
110 logs in at reboots of the system, thus
111 .Dq Li last reboot
112 will give an indication of mean time between reboot.
113 .Pp
114 If
115 .Nm last
116 is interrupted, it indicates to what date the search has
117 progressed.  If interrupted with a quit signal
118 .Nm last
119 indicates how
120 far the search has progressed and then continues.
121 .Sh FILES
122 .Bl -tag -width /var/log/wtmp -compact
123 .It Pa /var/log/wtmp
124 login data base
125 .El
126 .Sh SEE ALSO
127 .Xr lastcomm 1 ,
128 .Xr utmp 5 ,
129 .Xr ac 8
130 .Sh BUGS
131 If a login shell should terminate abnormally for some reason, it is likely
132 that a logout record won't be written to the wtmp file.
133 In this case,
134 .Nm last
135 will indicate the logout time as "shutdown".
136 .Sh HISTORY
137 .Nm Last
138 appeared in
139 .Bx 3.0 .