1.\" $NetBSD: finger.1,v 1.11 1999/03/22 18:16:37 garbled 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 November 21, 1996 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 lmpshog 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 s 55.Nm 56displays the user's login name, real name, terminal name and write 57status (as a ``*'' after the terminal name if write permission is 58denied), idle time, login time, and either office location and office 59phone number, or the remote host. 60If 61.Fl h 62is given, the remote is printed. 63If 64.Fl o 65is given, the office location and phone number is printed instead 66(the default). 67.Pp 68Idle time is in minutes if it is a single integer, hours and minutes 69if a ``:'' is present, or days if a ``d'' is present. 70Login time is displayed as the dayname if less than six days, 71else month, day, hours and minutes, unless 72more than six months ago, in which case the year is displayed rather 73than 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 names. 92.Pp 93.It Fl l 94Produces a multi-line format displaying all of the information 95described for the 96.Fl s 97option as well as the user's home directory, home phone number, login 98shell, mail status, and the contents of the files 99.Dq Pa .forward , 100.Dq Pa .plan 101and 102.Dq Pa .project 103from the user's home directory. 104.Pp 105If idle time is at least a minute and less than a day, it is 106presented in the form ``hh:mm''. 107Idle times greater than a day are presented as ``d day[s]hh:mm''. 108.Pp 109Phone numbers specified as eleven digits are printed as ``+N-NNN-NNN-NNNN''. 110Numbers specified as ten or seven digits are printed as the appropriate 111subset of that string. 112Numbers specified as five digits are printed as ``xN-NNNN''. 113Numbers specified as four digits are printed as ``xNNNN''. 114.Pp 115If write permission is denied to the device, the phrase ``(messages off)'' 116is appended to the line containing the device name. 117One entry per user is displayed with the 118.Fl l 119option; if a user is logged on multiple times, terminal information 120is repeated once per login. 121.Pp 122Mail status is shown as ``No Mail.'' if there is no mail at all, ``Mail 123last read DDD MMM ## HH:MM YYYY (TZ)'' if the person has looked at their 124mailbox since new mail arriving, or ``New mail received ...'', ``Unread 125since ...'' if they have new mail. 126.Pp 127.It Fl p 128Prevents 129the 130.Fl l 131option of 132.Nm 133from displaying the contents of the 134.Dq Pa .forward , 135.Dq Pa .plan 136and 137.Dq Pa .project 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.El 152.Pp 153If no options are specified, 154.Nm 155defaults to the 156.Fl l 157style output if operands are provided, otherwise to the 158.Fl s 159style. 160Note that some fields may be missing, in either format, if information 161is not available for them. 162.Pp 163If no arguments are specified, 164.Nm 165will print an entry for each user currently logged into the system. 166.Pp 167.Nm 168may be used to look up users on a remote machine. 169The format is to specify a 170.Ar user 171as 172.Dq Li user@host , 173or 174.Dq Li @host , 175where the default output 176format for the former is the 177.Fl l 178style, and the default output format for the latter is the 179.Fl s 180style. 181The 182.Fl l 183option is the only option that may be passed to a remote machine. 184.Sh FILES 185.Bl -tag -width /var/log/lastlog -compact 186.It Pa /var/log/lastlog 187last login data base 188.El 189.Sh SEE ALSO 190.Xr chpass 1 , 191.Xr w 1 , 192.Xr who 1 193.Sh HISTORY 194The 195.Nm 196command appeared in 197.Bx 3.0 . 198