]> git.cameronkatri.com Git - apple_cmds.git/blob - adv_cmds/finger/finger.1
Create README.md
[apple_cmds.git] / adv_cmds / 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.31 2005/09/19 10:11:46 dds Exp $
34 .\"
35 .Dd July 17, 2004
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 46gklmpsho
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 g
62 This option restricts the gecos output to only the users' real
63 name.
64 It also has the side-effect of restricting the output
65 of the remote host when used in conjunction with the
66 .Fl h
67 option.
68 .It Fl h
69 When used in conjunction with the
70 .Fl s
71 option, the name of the remote host is displayed instead of the office
72 location and office phone.
73 .It Fl k
74 Disable all use of
75 .Xr utmpx 5 .
76 .It Fl l
77 Produce a multi-line format displaying all of the information
78 described for the
79 .Fl s
80 option as well as the user's home directory, home phone number, login
81 shell, mail status, and the contents of the files
82 .Pa .forward ,
83 .Pa .plan ,
84 .Pa .project
85 and
86 .Pa .pubkey
87 from the user's home directory.
88 .Pp
89 If idle time is at least a minute and less than a day, it is
90 presented in the form ``hh:mm''.
91 Idle times greater than a day are presented as ``d day[s]hh:mm''.
92 .Pp
93 Phone numbers specified as eleven digits are printed as ``+N-NNN-NNN-NNNN''.
94 Numbers specified as ten or seven digits are printed as the appropriate
95 subset of that string.
96 Numbers specified as five digits are printed as ``xN-NNNN''.
97 Numbers specified as four digits are printed as ``xNNNN''.
98 .Pp
99 If write permission is denied to the device, the phrase ``(messages off)''
100 is appended to the line containing the device name.
101 One entry per user is displayed with the
102 .Fl l
103 option; if a user is logged on multiple times, terminal information
104 is repeated once per login.
105 .Pp
106 Mail status is shown as ``No Mail.'' if there is no mail at all, ``Mail
107 last read DDD MMM ## HH:MM YYYY (TZ)'' if the person has looked at their
108 mailbox since new mail arriving, or ``New mail received ...'', ``Unread
109 since ...'' if they have new mail.
110 .It Fl m
111 Prevent matching of
112 .Ar user
113 names.
114 .Ar User
115 is usually a login name; however, matching will also be done on the
116 users' real names, unless the
117 .Fl m
118 option is supplied.
119 All name matching performed by
120 .Nm
121 is case insensitive.
122 .It Fl o
123 When used in conjunction with the
124 .Fl s
125 option, the office location and office phone information is displayed
126 instead of the name of the remote host.
127 .It Fl p
128 Prevent
129 the
130 .Fl l
131 option of
132 .Nm
133 from displaying the contents of the
134 .Pa .forward ,
135 .Pa .plan ,
136 .Pa .project
137 and
138 .Pa .pubkey
139 files.
140 .It Fl s
141 Display the user's login name, real name, terminal name and write
142 status (as a ``*'' before the terminal name if write permission is
143 denied), idle time, login time, and either office location and office
144 phone number, or the remote host.
145 If
146 .Fl o
147 is given, the office location and office phone number is printed
148 (the default).
149 If
150 .Fl h
151 is given, the remote host is printed instead.
152 .Pp
153 Idle time is in minutes if it is a single integer, hours and minutes
154 if a ``:'' is present, or days if a ``d'' is present.
155 If it is an
156 .Dq * ,
157 the login time indicates the time of last login.
158 Login time is displayed as the day name if less than 6 days, else month, day;
159 hours and minutes, unless more than six months ago, in which case the year
160 is displayed rather than the hours and minutes.
161 .Pp
162 Unknown devices as well as nonexistent idle and login times are
163 displayed as single asterisks.
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 and the program is not run with superuser privileges,
203 .Nm
204 behaves as if the user in question does not exist.
205 .Pp
206 The optional
207 .Xr finger.conf 5
208 configuration file can be used to specify aliases.
209 Since
210 .Nm
211 is invoked by
212 .Xr fingerd 8 ,
213 aliases will work for both local and network queries.
214 .Sh ENVIRONMENT
215 The
216 .Nm
217 utility utilizes the following environment variable, if it exists:
218 .Bl -tag -width Fl
219 .It Ev FINGER
220 This variable may be set with favored options to
221 .Nm .
222 .El
223 .Sh FILES
224 .Bl -tag -width /var/log/lastlog -compact
225 .It Pa /etc/finger.conf
226 alias definition data base
227 .It Pa /var/log/lastlog
228 last login data base
229 .El
230 .Sh SEE ALSO
231 .Xr chpass 1 ,
232 .Xr w 1 ,
233 .Xr who 1 ,
234 .Xr finger.conf 5 ,
235 .Xr fingerd 8
236 .Rs
237 .%A D. Zimmerman
238 .%T The Finger User Information Protocol
239 .%R RFC 1288
240 .%D December, 1991
241 .Re
242 .Sh HISTORY
243 The
244 .Nm
245 command appeared in
246 .Bx 3.0 .
247 .Sh BUGS
248 The current FINGER protocol RFC requires that the client keep the connection
249 fully open until the server closes.
250 This prevents the use of the optimal
251 three-packet T/TCP exchange.
252 (Servers which depend on this requirement are
253 bogus but have nonetheless been observed in the Internet at large.)
254 .Pp
255 The
256 .Nm
257 utility does not recognize multibyte characters.