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