]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/finger/finger.1
Add 'contrib/unifdef/' from commit '0da44885831dc0a43c4ca6ff04a2430993cc0a80'
[FreeBSD/FreeBSD.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. Neither the name of the University nor the names of its contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"    without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .\"     @(#)finger.1    8.3 (Berkeley) 5/5/94
29 .\"
30 .Dd January 21, 2010
31 .Dt FINGER 1
32 .Os
33 .Sh NAME
34 .Nm finger
35 .Nd user information lookup program
36 .Sh SYNOPSIS
37 .Nm
38 .Op Fl 46gklmpsho
39 .Op Ar user ...\&
40 .Op Ar user@host ...\&
41 .Sh DESCRIPTION
42 The
43 .Nm
44 utility displays information about the system users.
45 .Pp
46 Options are:
47 .Bl -tag -width indent
48 .It Fl 4
49 Forces
50 .Nm
51 to use IPv4 addresses only.
52 .It Fl 6
53 Forces
54 .Nm
55 to use IPv6 addresses only.
56 .It Fl s
57 Display the user's login name, real name, terminal name and write
58 status (as a ``*'' before the terminal name if write permission is
59 denied), idle time, login time, and either office location and office
60 phone number, or the remote host.
61 If
62 .Fl o
63 is given, the office location and office phone number is printed
64 (the default).
65 If
66 .Fl h
67 is given, the remote host is printed instead.
68 .Pp
69 Idle time is in minutes if it is a single integer, hours and minutes
70 if a ``:'' is present, or days if a ``d'' is present.
71 If it is an
72 .Dq * ,
73 the login time indicates the time of last login.
74 Login time is displayed as the day name if less than 6 days, else month, day;
75 hours and minutes, unless more than six months ago, in which case the year
76 is displayed rather than the hours and minutes.
77 .Pp
78 Unknown devices as well as nonexistent idle and login times are
79 displayed as single asterisks.
80 .It Fl h
81 When used in conjunction with the
82 .Fl s
83 option, the name of the remote host is displayed instead of the office
84 location and office phone.
85 .It Fl o
86 When used in conjunction with the
87 .Fl s
88 option, the office location and office phone information is displayed
89 instead of the name of the remote host.
90 .It Fl g
91 This option restricts the gecos output to only the users' real
92 name.
93 It also has the side-effect of restricting the output
94 of the remote host when used in conjunction with the
95 .Fl h
96 option.
97 .It Fl k
98 Disable all use of the user accounting database.
99 .It Fl l
100 Produce a multi-line format displaying all of the information
101 described for the
102 .Fl s
103 option as well as the user's home directory, home phone number, login
104 shell, mail status, and the contents of the files
105 .Pa .forward ,
106 .Pa .plan ,
107 .Pa .project
108 and
109 .Pa .pubkey
110 from the user's home directory.
111 .Pp
112 If idle time is at least a minute and less than a day, it is
113 presented in the form ``hh:mm''.
114 Idle times greater than a day are presented as ``d day[s]hh:mm''.
115 .Pp
116 Phone numbers specified as eleven digits are printed as ``+N-NNN-NNN-NNNN''.
117 Numbers specified as ten or seven digits are printed as the appropriate
118 subset of that string.
119 Numbers specified as five digits are printed as ``xN-NNNN''.
120 Numbers specified as four digits are printed as ``xNNNN''.
121 .Pp
122 If write permission is denied to the device, the phrase ``(messages off)''
123 is appended to the line containing the device name.
124 One entry per user is displayed with the
125 .Fl l
126 option; if a user is logged on multiple times, terminal information
127 is repeated once per login.
128 .Pp
129 Mail status is shown as ``No Mail.'' if there is no mail at all, ``Mail
130 last read DDD MMM ## HH:MM YYYY (TZ)'' if the person has looked at their
131 mailbox since new mail arriving, or ``New mail received ...'', ``Unread
132 since ...'' if they have new mail.
133 .It Fl p
134 Prevent
135 the
136 .Fl l
137 option of
138 .Nm
139 from displaying the contents of the
140 .Pa .forward ,
141 .Pa .plan ,
142 .Pa .project
143 and
144 .Pa .pubkey
145 files.
146 .It Fl m
147 Prevent matching of
148 .Ar user
149 names.
150 .Ar User
151 is usually a login name; however, matching will also be done on the
152 users' real names, unless the
153 .Fl m
154 option is supplied.
155 All name matching performed by
156 .Nm
157 is case insensitive.
158 .El
159 .Pp
160 If no options are specified,
161 .Nm
162 defaults to the
163 .Fl l
164 style output if operands are provided, otherwise to the
165 .Fl s
166 style.
167 Note that some fields may be missing, in either format, if information
168 is not available for them.
169 .Pp
170 If no arguments are specified,
171 .Nm
172 will print an entry for each user currently logged into the system.
173 .Pp
174 The
175 .Nm
176 utility may be used to look up users on a remote machine.
177 The format is to specify a
178 .Ar user
179 as
180 .Dq Li user@host ,
181 or
182 .Dq Li @host ,
183 where the default output
184 format for the former is the
185 .Fl l
186 style, and the default output format for the latter is the
187 .Fl s
188 style.
189 The
190 .Fl l
191 option is the only option that may be passed to a remote machine.
192 .Pp
193 If the file
194 .Pa .nofinger
195 exists in the user's home directory,
196 and the program is not run with superuser privileges,
197 .Nm
198 behaves as if the user in question does not exist.
199 .Pp
200 The optional
201 .Xr finger.conf 5
202 configuration file can be used to specify aliases.
203 Since
204 .Nm
205 is invoked by
206 .Xr fingerd 8 ,
207 aliases will work for both local and network queries.
208 .Sh ENVIRONMENT
209 The
210 .Nm
211 utility utilizes the following environment variable, if it exists:
212 .Bl -tag -width Fl
213 .It Ev FINGER
214 This variable may be set with favored options to
215 .Nm .
216 .El
217 .Sh FILES
218 .Bl -tag -width /var/log/utx.lastlogin -compact
219 .It Pa /etc/finger.conf
220 alias definition data base
221 .It Pa /var/log/utx.lastlogin
222 last login data base
223 .El
224 .Sh SEE ALSO
225 .Xr chpass 1 ,
226 .Xr w 1 ,
227 .Xr who 1 ,
228 .Xr finger.conf 5 ,
229 .Xr fingerd 8
230 .Rs
231 .%A D. Zimmerman
232 .%T The Finger User Information Protocol
233 .%R RFC 1288
234 .%D December, 1991
235 .Re
236 .Sh HISTORY
237 The
238 .Nm
239 command appeared in
240 .Bx 3.0 .
241 .Sh BUGS
242 The
243 .Nm
244 utility does not recognize multibyte characters.