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