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