1.\" $NetBSD: finger.1,v 1.14 2002/09/30 11:09:00 grant Exp $ 2.\" 3.\" Copyright (c) 1989, 1990, 1993, 1994 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. All advertising materials mentioning features or use of this software 15.\" must display the following acknowledgement: 16.\" This product includes software developed by the University of 17.\" California, Berkeley and its contributors. 18.\" 4. Neither the name of the University nor the names of its contributors 19.\" may be used to endorse or promote products derived from this software 20.\" without specific prior written permission. 21.\" 22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32.\" SUCH DAMAGE. 33.\" 34.\" from: @(#)finger.1 8.3 (Berkeley) 5/5/94 35.\" 36.Dd September 12, 2002 37.Dt FINGER 1 38.Os 39.Sh NAME 40.Nm finger 41.Nd user information lookup program 42.Sh SYNOPSIS 43.Nm 44.Op Fl 8ghlmops 45.Op Ar user ... 46.Op Ar user@host ... 47.Sh DESCRIPTION 48The 49.Nm 50displays information about the system users. 51.Pp 52Options are: 53.Bl -tag -width flag 54.It Fl 8 55Pass through 8-bit data. 56This option is intended for enabling 8-bit 57data output in the 58.Xr fingerd 8 59service. 60Using this from the command line is 61.Em dangerous , 62as the output data may include control characters for your terminal. 63.It Fl g 64This option restricts the gecos output to only the users' real names. 65.It Fl h 66When used in conjunction with the 67.Fl s 68option, the name of the remote host is displayed instead of the office 69location and office phone. 70.It Fl l 71Produces a multi-line format displaying all of the information 72described for the 73.Fl s 74option as well as the user's home directory, home phone number, login 75shell, mail status, and the contents of the files 76.Dq Pa .forward , 77.Dq Pa .plan 78and 79.Dq Pa .project 80from the user's home directory. 81.Pp 82If idle time is at least a minute and less than a day, it is 83presented in the form 84.Dq hh:mm . 85Idle times greater than a day are presented as 86.Dq d day[s]hh:mm . 87.Pp 88Phone numbers specified as eleven digits are printed as 89.Dq +N-NNN-NNN-NNNN . 90Numbers specified as ten or seven digits are printed as the appropriate 91subset of that string. 92Numbers specified as five digits are printed as 93.Dq xN-NNNN . 94Numbers specified as four digits are printed as 95.Dq xNNNN . 96.Pp 97If write permission is denied to the device, the phrase 98.Dq (messages off) 99is appended to the line containing the device name. 100One entry per user is displayed with the 101.Fl l 102option; if a user is logged on multiple times, terminal information 103is repeated once per login. 104.Pp 105Mail status is shown as 106.Dq \&No Mail. 107if there is no mail at all, ``Mail last read DDD MMM ## HH:MM YYYY (TZ)'' 108if the person has looked at their 109mailbox since new mail arriving, or 110.Dq New mail received ... , 111.Dq Unread since \&... 112if they have new mail. 113.It Fl m 114Prevent matching of 115.Ar user 116names. 117.Ar User 118is usually a login name; however, matching will also be done on the 119users' real names, unless the 120.Fl m 121option is supplied. 122All name matching performed by 123.Nm 124is case insensitive. 125.It Fl o 126When used in conjunction with the 127.Fl s 128option, the office location and office phone information is displayed 129instead of the name of the remote host. 130.It Fl p 131Prevents 132the 133.Fl l 134option of 135.Nm 136from displaying the contents of the 137.Dq Pa .forward , 138.Dq Pa .plan 139and 140.Dq Pa .project 141files. 142.It Fl s 143.Nm 144displays the user's login name, real name, terminal name and write 145status (as a 146.Dq * 147after the terminal name if write permission is denied), idle time, 148login time, and either office location and office phone number, 149or the remote host. 150If 151.Fl h 152is given, the remote is printed. 153If 154.Fl o 155is given, the office location and phone number is printed instead 156(the default). 157.Pp 158Idle time is in minutes if it is a single integer, hours and minutes 159if a 160.Dq \&: 161is present, or days if a 162.Dq d 163is present. 164Login time is displayed as the dayname if less than six days, 165else month, day, hours and minutes, unless 166more than six months ago, in which case the year is displayed rather 167than the hours and minutes. 168.Pp 169Unknown devices as well as nonexistent idle and login times are 170displayed as single asterisks. 171.El 172.Pp 173If no options are specified, 174.Nm 175defaults to the 176.Fl l 177style output if operands are provided, otherwise to the 178.Fl s 179style. 180Note that some fields may be missing, in either format, if information 181is not available for them. 182.Pp 183If no arguments are specified, 184.Nm 185will print an entry for each user currently logged into the system. 186.Pp 187.Nm 188may be used to look up users on a remote machine. 189The format is to specify a 190.Ar user 191as 192.Dq Li user@host , 193or 194.Dq Li @host , 195where the default output 196format for the former is the 197.Fl l 198style, and the default output format for the latter is the 199.Fl s 200style. 201The 202.Fl l 203option is the only option that may be passed to a remote machine. 204.Sh FILES 205.Bl -tag -width /var/log/lastlog -compact 206.It Pa /var/log/lastlog 207last login data base 208.El 209.Sh SEE ALSO 210.Xr chpass 1 , 211.Xr w 1 , 212.Xr who 1 213.Sh HISTORY 214The 215.Nm 216command appeared in 217.Bx 3.0 . 218