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