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