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