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