get mxge to build, stage 29/many
[dragonfly.git] / usr.bin / finger / finger.1
blobf488ff503a9501a3b8b8b1179ad23fc3a5678424
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.4 2004/09/03 19:13:23 dillon Exp $
35 .\"
36 .Dd August 30, 2004
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 468glmpshoT
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 8
63 Pass through 8-bit data.  This option is intended for enabling 8-bit
64 data output in the
65 .Xr fingerd 8
66 service.  Using this from the command line is
67 .Em dangerous ,
68 as the output data may include control characters for your terminal.
69 .It Fl s
70 Display the user's login name, real name, terminal name and write
71 status (as a ``*'' before the terminal name if write permission is
72 denied), idle time, login time, and either office location and office
73 phone number, or the remote host.
75 .Fl o
76 is given, the office location and office phone number is printed
77 (the default).
79 .Fl h
80 is given, the remote host is printed instead.
81 .Pp
82 Idle time is in minutes if it is a single integer, hours and minutes
83 if a ``:'' is present, or days if a ``d'' is present.
84 If it is an
85 .Dq * ,
86 the login time indicates the time of last login.
87 Login time is displayed as the day name if less than 6 days, else month, day;
88 hours and minutes, unless more than six months ago, in which case the year
89 is displayed rather than the hours and minutes.
90 .Pp
91 Unknown devices as well as nonexistent idle and login times are
92 displayed as single asterisks.
93 .It Fl h
94 When used in conjunction with the
95 .Fl s
96 option, the name of the remote host is displayed instead of the office
97 location and office phone.
98 .It Fl o
99 When used in conjunction with the
100 .Fl s
101 option, the office location and office phone information is displayed
102 instead of the name of the remote host.
103 .It Fl g
104 This option restricts the gecos output to only the users' real
105 name.
106 It also has the side-effect of restricting the output
107 of the remote host when used in conjunction with the
108 .Fl h
109 option.
110 .It Fl l
111 Produce a multi-line format displaying all of the information
112 described for the
113 .Fl s
114 option as well as the user's home directory, home phone number, login
115 shell, mail status, and the contents of the files
116 .Pa .forward ,
117 .Pa .plan ,
118 .Pa .project
120 .Pa .pubkey
121 from the user's home directory.
123 If idle time is at least a minute and less than a day, it is
124 presented in the form ``hh:mm''.
125 Idle times greater than a day are presented as ``d day[s]hh:mm''.
127 Phone numbers specified as eleven digits are printed as ``+N-NNN-NNN-NNNN''.
128 Numbers specified as ten or seven digits are printed as the appropriate
129 subset of that string.
130 Numbers specified as five digits are printed as ``xN-NNNN''.
131 Numbers specified as four digits are printed as ``xNNNN''.
133 If write permission is denied to the device, the phrase ``(messages off)''
134 is appended to the line containing the device name.
135 One entry per user is displayed with the
136 .Fl l
137 option; if a user is logged on multiple times, terminal information
138 is repeated once per login.
140 Mail status is shown as ``No Mail.'' if there is no mail at all, ``Mail
141 last read DDD MMM ## HH:MM YYYY (TZ)'' if the person has looked at their
142 mailbox since new mail arriving, or ``New mail received ...'', ``Unread
143 since ...'' if they have new mail.
144 .It Fl p
145 Prevent
147 .Fl l
148 option of
150 from displaying the contents of the
151 .Pa .forward ,
152 .Pa .plan ,
153 .Pa .project
155 .Pa .pubkey
156 files.
157 .It Fl m
158 Prevent matching of
159 .Ar user
160 names.
161 .Ar User
162 is usually a login name; however, matching will also be done on the
163 users' real names, unless the
164 .Fl m
165 option is supplied.
166 All name matching performed by
168 is case insensitive.
169 .It Fl T
170 Disable the piggybacking of data on the initial connection request.
171 This option is needed to finger hosts with a broken TCP implementation.
174 If no options are specified,
176 defaults to the
177 .Fl l
178 style output if operands are provided, otherwise to the
179 .Fl s
180 style.
181 Note that some fields may be missing, in either format, if information
182 is not available for them.
184 If no arguments are specified,
186 will print an entry for each user currently logged into the system.
190 utility may be used to look up users on a remote machine.
191 The format is to specify a
192 .Ar user
194 .Dq Li user@host ,
196 .Dq Li @host ,
197 where the default output
198 format for the former is the
199 .Fl l
200 style, and the default output format for the latter is the
201 .Fl s
202 style.
204 .Fl l
205 option is the only option that may be passed to a remote machine.
207 If the file
208 .Pa .nofinger
209 exists in the user's home directory,
211 behaves as if the user in question does not exist.
213 The optional
214 .Xr finger.conf 5
215 configuration file can be used to specify aliases.
216 Since
218 is invoked by
219 .Xr fingerd 8 ,
220 aliases will work for both local and network queries.
221 .Sh ENVIRONMENT
224 utility utilizes the following environment variable, if it exists:
225 .Bl -tag -width Fl
226 .It Ev FINGER
227 This variable may be set with favored options to
228 .Nm .
230 .Sh FILES
231 .Bl -tag -width /var/log/lastlog -compact
232 .It Pa /etc/finger.conf
233 alias definition data base
234 .It Pa /var/log/lastlog
235 last login data base
237 .Sh SEE ALSO
238 .Xr chpass 1 ,
239 .Xr w 1 ,
240 .Xr who 1 ,
241 .Xr finger.conf 5 ,
242 .Xr fingerd 8
244 .%A D. Zimmerman
245 .%T The Finger User Information Protocol
246 .%R RFC 1288
247 .%D December, 1991
249 .Sh HISTORY
252 command appeared in
253 .Bx 3.0 .
254 .Sh BUGS
255 The current FINGER protocol RFC requires that the client keep the connection
256 fully open until the server closes.
257 This prevents the use of the optimal
258 three-packet T/TCP exchange.
259 (Servers which depend on this requirement are
260 bogus but have nonetheless been observed in the Internet at large.)