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