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