xref: /dragonfly/usr.bin/finger/finger.1 (revision 6e285212)
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.2 2003/06/17 04:29:26 dillon 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. It also has the side-effect of restricting the output
99of the remote host when used in conjunction with the
100.Fl h
101option.
102.It Fl l
103Produce a multi-line format displaying all of the information
104described for the
105.Fl s
106option as well as the user's home directory, home phone number, login
107shell, mail status, and the contents of the files
108.Pa .forward ,
109.Pa .plan ,
110.Pa .project
111and
112.Pa .pubkey
113from the user's home directory.
114.Pp
115If idle time is at least a minute and less than a day, it is
116presented in the form ``hh:mm''.
117Idle times greater than a day are presented as ``d day[s]hh:mm''.
118.Pp
119Phone numbers specified as eleven digits are printed as ``+N-NNN-NNN-NNNN''.
120Numbers specified as ten or seven digits are printed as the appropriate
121subset of that string.
122Numbers specified as five digits are printed as ``xN-NNNN''.
123Numbers specified as four digits are printed as ``xNNNN''.
124.Pp
125If write permission is denied to the device, the phrase ``(messages off)''
126is appended to the line containing the device name.
127One entry per user is displayed with the
128.Fl l
129option; if a user is logged on multiple times, terminal information
130is repeated once per login.
131.Pp
132Mail status is shown as ``No Mail.'' if there is no mail at all, ``Mail
133last read DDD MMM ## HH:MM YYYY (TZ)'' if the person has looked at their
134mailbox since new mail arriving, or ``New mail received ...'', ``Unread
135since ...'' if they have new mail.
136.It Fl p
137Prevent
138the
139.Fl l
140option of
141.Nm
142from displaying the contents of the
143.Pa .forward ,
144.Pa .plan ,
145.Pa .project
146and
147.Pa .pubkey
148files.
149.It Fl m
150Prevent matching of
151.Ar user
152names.
153.Ar User
154is usually a login name; however, matching will also be done on the
155users' real names, unless the
156.Fl m
157option is supplied.
158All name matching performed by
159.Nm
160is case insensitive.
161.It Fl T
162Disable the piggybacking of data on the initial connection request.
163This option is needed to finger hosts with a broken TCP implementation.
164.El
165.Pp
166If no options are specified,
167.Nm
168defaults to the
169.Fl l
170style output if operands are provided, otherwise to the
171.Fl s
172style.
173Note that some fields may be missing, in either format, if information
174is not available for them.
175.Pp
176If no arguments are specified,
177.Nm
178will print an entry for each user currently logged into the system.
179.Pp
180The
181.Nm
182utility may be used to look up users on a remote machine.
183The format is to specify a
184.Ar user
185as
186.Dq Li user@host ,
187or
188.Dq Li @host ,
189where the default output
190format for the former is the
191.Fl l
192style, and the default output format for the latter is the
193.Fl s
194style.
195The
196.Fl l
197option is the only option that may be passed to a remote machine.
198.Pp
199If the file
200.Pa .nofinger
201exists in the user's home directory,
202.Nm
203behaves as if the user in question does not exist.
204.Pp
205The optional
206.Xr finger.conf 5
207configuration file can be used to specify aliases.
208Since
209.Nm
210is invoked by
211.Xr fingerd 8 ,
212aliases will work for both local and network queries.
213.Sh ENVIRONMENT
214The
215.Nm
216utility utilizes the following environment variable, if it exists:
217.Bl -tag -width Fl
218.It Ev FINGER
219This variable may be set with favored options to
220.Nm .
221.El
222.Sh FILES
223.Bl -tag -width /var/log/lastlog -compact
224.It Pa /etc/finger.conf
225alias definition data base
226.It Pa /var/log/lastlog
227last login data base
228.El
229.Sh SEE ALSO
230.Xr chpass 1 ,
231.Xr w 1 ,
232.Xr who 1 ,
233.Xr finger.conf 5 ,
234.Xr fingerd 8
235.Rs
236.%A D. Zimmerman
237.%T The Finger User Information Protocol
238.%R RFC 1288
239.%D December, 1991
240.Re
241.Sh HISTORY
242The
243.Nm
244command appeared in
245.Bx 3.0 .
246.Sh BUGS
247The current FINGER protocol RFC requires that the client keep the connection
248fully open until the server closes.  This prevents the use of the optimal
249three-packet T/TCP exchange.  (Servers which depend on this requirement are
250bogus but have nonetheless been observed in the Internet at large.)
251