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