Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / usr.bin / finger / finger.1
1 .\" Copyright (c) 1989, 1990, 1993, 1994
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 .\"     @(#)finger.1    8.3 (Berkeley) 5/5/94
33 .\" $FreeBSD: src/usr.bin/finger/finger.1,v 1.9.2.12 2003/02/25 20:31:18 trhodes Exp $
34 .\" $DragonFly: src/usr.bin/finger/finger.1,v 1.2 2003/06/17 04:29:26 dillon Exp $
35 .\"
36 .Dd July 22, 2002
37 .Dt FINGER 1
38 .Os
39 .Sh NAME
40 .Nm finger
41 .Nd user information lookup program
42 .Sh SYNOPSIS
43 .Nm
44 .Op Fl 46glmpshoT
45 .Op Ar user ...\&
46 .Op Ar user@host ...\&
47 .Sh DESCRIPTION
48 The
49 .Nm
50 utility displays information about the system users.
51 .Pp
52 Options are:
53 .Bl -tag -width indent
54 .It Fl 4
55 Forces
56 .Nm
57 to use IPv4 addresses only.
58 .It Fl 6
59 Forces
60 .Nm
61 to use IPv6 addresses only.
62 .It Fl s
63 Display the user's login name, real name, terminal name and write
64 status (as a ``*'' before the terminal name if write permission is
65 denied), idle time, login time, and either office location and office
66 phone number, or the remote host.
67 If
68 .Fl o
69 is given, the office location and office phone number is printed
70 (the default).
71 If
72 .Fl h
73 is given, the remote host is printed instead.
74 .Pp
75 Idle time is in minutes if it is a single integer, hours and minutes
76 if a ``:'' is present, or days if a ``d'' is present.
77 If it is an
78 .Dq * ,
79 the login time indicates the time of last login.
80 Login time is displayed as the day name if less than 6 days, else month, day;
81 hours and minutes, unless more than six months ago, in which case the year
82 is displayed rather than the hours and minutes.
83 .Pp
84 Unknown devices as well as nonexistent idle and login times are
85 displayed as single asterisks.
86 .It Fl h
87 When used in conjunction with the
88 .Fl s
89 option, the name of the remote host is displayed instead of the office
90 location and office phone.
91 .It Fl o
92 When used in conjunction with the
93 .Fl s
94 option, the office location and office phone information is displayed
95 instead of the name of the remote host.
96 .It Fl g
97 This option restricts the gecos output to only the users' real
98 name. It also has the side-effect of restricting the output
99 of the remote host when used in conjunction with the
100 .Fl h
101 option.
102 .It Fl l
103 Produce a multi-line format displaying all of the information
104 described for the
105 .Fl s
106 option as well as the user's home directory, home phone number, login
107 shell, mail status, and the contents of the files
108 .Pa .forward ,
109 .Pa .plan ,
110 .Pa .project
111 and
112 .Pa .pubkey
113 from the user's home directory.
114 .Pp
115 If idle time is at least a minute and less than a day, it is
116 presented in the form ``hh:mm''.
117 Idle times greater than a day are presented as ``d day[s]hh:mm''.
118 .Pp
119 Phone numbers specified as eleven digits are printed as ``+N-NNN-NNN-NNNN''.
120 Numbers specified as ten or seven digits are printed as the appropriate
121 subset of that string.
122 Numbers specified as five digits are printed as ``xN-NNNN''.
123 Numbers specified as four digits are printed as ``xNNNN''.
124 .Pp
125 If write permission is denied to the device, the phrase ``(messages off)''
126 is appended to the line containing the device name.
127 One entry per user is displayed with the
128 .Fl l
129 option; if a user is logged on multiple times, terminal information
130 is repeated once per login.
131 .Pp
132 Mail status is shown as ``No Mail.'' if there is no mail at all, ``Mail
133 last read DDD MMM ## HH:MM YYYY (TZ)'' if the person has looked at their
134 mailbox since new mail arriving, or ``New mail received ...'', ``Unread
135 since ...'' if they have new mail.
136 .It Fl p
137 Prevent
138 the
139 .Fl l
140 option of
141 .Nm
142 from displaying the contents of the
143 .Pa .forward ,
144 .Pa .plan ,
145 .Pa .project
146 and
147 .Pa .pubkey
148 files.
149 .It Fl m
150 Prevent matching of
151 .Ar user
152 names.
153 .Ar User
154 is usually a login name; however, matching will also be done on the
155 users' real names, unless the
156 .Fl m
157 option is supplied.
158 All name matching performed by
159 .Nm
160 is case insensitive.
161 .It Fl T
162 Disable the piggybacking of data on the initial connection request.
163 This option is needed to finger hosts with a broken TCP implementation.
164 .El
165 .Pp
166 If no options are specified,
167 .Nm
168 defaults to the
169 .Fl l
170 style output if operands are provided, otherwise to the
171 .Fl s
172 style.
173 Note that some fields may be missing, in either format, if information
174 is not available for them.
175 .Pp
176 If no arguments are specified,
177 .Nm
178 will print an entry for each user currently logged into the system.
179 .Pp
180 The
181 .Nm
182 utility may be used to look up users on a remote machine.
183 The format is to specify a
184 .Ar user
185 as
186 .Dq Li user@host ,
187 or
188 .Dq Li @host ,
189 where the default output
190 format for the former is the
191 .Fl l
192 style, and the default output format for the latter is the
193 .Fl s
194 style.
195 The
196 .Fl l
197 option is the only option that may be passed to a remote machine.
198 .Pp
199 If the file
200 .Pa .nofinger
201 exists in the user's home directory,
202 .Nm
203 behaves as if the user in question does not exist.
204 .Pp
205 The optional
206 .Xr finger.conf 5
207 configuration file can be used to specify aliases.
208 Since
209 .Nm
210 is invoked by
211 .Xr fingerd 8 ,
212 aliases will work for both local and network queries.
213 .Sh ENVIRONMENT
214 The
215 .Nm
216 utility utilizes the following environment variable, if it exists:
217 .Bl -tag -width Fl
218 .It Ev FINGER
219 This variable may be set with favored options to
220 .Nm .
221 .El
222 .Sh FILES
223 .Bl -tag -width /var/log/lastlog -compact
224 .It Pa /etc/finger.conf
225 alias definition data base
226 .It Pa /var/log/lastlog
227 last login data base
228 .El
229 .Sh SEE ALSO
230 .Xr chpass 1 ,
231 .Xr w 1 ,
232 .Xr who 1 ,
233 .Xr finger.conf 5 ,
234 .Xr fingerd 8
235 .Rs
236 .%A D. Zimmerman
237 .%T The Finger User Information Protocol
238 .%R RFC 1288
239 .%D December, 1991
240 .Re
241 .Sh HISTORY
242 The
243 .Nm
244 command appeared in
245 .Bx 3.0 .
246 .Sh BUGS
247 The current FINGER protocol RFC requires that the client keep the connection
248 fully open until the server closes.  This prevents the use of the optimal
249 three-packet T/TCP exchange.  (Servers which depend on this requirement are
250 bogus but have nonetheless been observed in the Internet at large.)