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