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