xref: /freebsd/usr.bin/who/who.1 (revision 2fccbf04cc879fa1e1a4cd0382e8eb554a8fd60d)
19b50d902SRodney W. Grimes.\" Copyright (c) 1986, 1991, 1993
29b50d902SRodney W. Grimes.\"	The Regents of the University of California.  All rights reserved.
39b50d902SRodney W. Grimes.\"
49b50d902SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without
59b50d902SRodney W. Grimes.\" modification, are permitted provided that the following conditions
69b50d902SRodney W. Grimes.\" are met:
79b50d902SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright
89b50d902SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer.
99b50d902SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright
109b50d902SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer in the
119b50d902SRodney W. Grimes.\"    documentation and/or other materials provided with the distribution.
129b50d902SRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors
139b50d902SRodney W. Grimes.\"    may be used to endorse or promote products derived from this software
149b50d902SRodney W. Grimes.\"    without specific prior written permission.
159b50d902SRodney W. Grimes.\"
169b50d902SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
179b50d902SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
189b50d902SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
199b50d902SRodney W. Grimes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
209b50d902SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
219b50d902SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
229b50d902SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
239b50d902SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
249b50d902SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
259b50d902SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
269b50d902SRodney W. Grimes.\" SUCH DAMAGE.
279b50d902SRodney W. Grimes.\"
289b50d902SRodney W. Grimes.\"     @(#)who.1	8.2 (Berkeley) 12/30/93
29c3aac50fSPeter Wemm.\" $FreeBSD$
309b50d902SRodney W. Grimes.\"
3179625d00SEd Schouten.Dd February 11, 2012
329b50d902SRodney W. Grimes.Dt WHO 1
339b50d902SRodney W. Grimes.Os
349b50d902SRodney W. Grimes.Sh NAME
359b50d902SRodney W. Grimes.Nm who
3638a99942STim J. Robbins.Nd display who is on the system
379b50d902SRodney W. Grimes.Sh SYNOPSIS
388fe908efSRuslan Ermilov.Nm
3979625d00SEd Schouten.Op Fl abHmqsTu
4038a99942STim J. Robbins.Op Cm am I
419b50d902SRodney W. Grimes.Op Ar file
429b50d902SRodney W. Grimes.Sh DESCRIPTION
430abcff76SPhilippe CharnierThe
440abcff76SPhilippe Charnier.Nm
4538a99942STim J. Robbinsutility displays information about currently logged in users.
4638a99942STim J. RobbinsBy default, this includes the login name, tty name, date and time of login and
4738a99942STim J. Robbinsremote hostname if not local.
489b50d902SRodney W. Grimes.Pp
4938a99942STim J. RobbinsThe options are as follows:
5038a99942STim J. Robbins.Bl -tag -width indent
5179625d00SEd Schouten.It Fl a
5279625d00SEd SchoutenEquivalent to
5379625d00SEd Schouten.Fl bTu ,
5479625d00SEd Schoutenwith the exception that output isn't restricted to the time and date of
5579625d00SEd Schoutenthe last system reboot.
5685714224SSergey Kandaurov.It Fl b
5785714224SSergey KandaurovWrite the time and date of the last system reboot.
5838a99942STim J. Robbins.It Fl H
5938a99942STim J. RobbinsWrite column headings above the output.
6038a99942STim J. Robbins.It Fl m
6138a99942STim J. RobbinsShow information about the terminal attached to standard input only.
6238a99942STim J. Robbins.It Fl q
638c756f11SRuslan Ermilov.Dq "Quick mode" :
6438a99942STim J. RobbinsList the names and number of logged in users in columns.
6538a99942STim J. RobbinsAll other command line options are ignored.
6638a99942STim J. Robbins.It Fl s
6738a99942STim J. RobbinsShow the name, line and time fields only.
6838a99942STim J. RobbinsThis is the default.
6938a99942STim J. Robbins.It Fl T
7038a99942STim J. RobbinsIndicate whether each user is accepting messages.
7138a99942STim J. RobbinsOne of the following characters is written:
728c756f11SRuslan Ermilov.Pp
738c756f11SRuslan Ermilov.Bl -tag -width 1n -compact
748c756f11SRuslan Ermilov.It Li +
7538a99942STim J. RobbinsUser is accepting messages.
768c756f11SRuslan Ermilov.It Li \&-
7738a99942STim J. RobbinsUser is not accepting messages.
788c756f11SRuslan Ermilov.It Li \&?
7938a99942STim J. RobbinsAn error occurred.
8038a99942STim J. Robbins.El
8138a99942STim J. Robbins.It Fl u
8238a99942STim J. RobbinsShow idle time for each user in hours and minutes as
838c756f11SRuslan Ermilov.Ar hh Ns : Ns Ar mm ,
8438a99942STim J. Robbins.Ql \&.
85*2fccbf04SGlen Barberif the user has been idle less than a minute, and
868c756f11SRuslan Ermilov.Dq Li old
8738a99942STim J. Robbinsif the user has been idle more than 24 hours.
8838a99942STim J. Robbins.It Cm am I
8938a99942STim J. RobbinsEquivalent to
9038a99942STim J. Robbins.Fl m .
9138a99942STim J. Robbins.El
929b50d902SRodney W. Grimes.Pp
939b50d902SRodney W. GrimesBy default,
940abcff76SPhilippe Charnier.Nm
959b50d902SRodney W. Grimesgathers information from the file
960806dd92SEd Schouten.Pa /var/run/utx.active .
979b50d902SRodney W. GrimesAn alternate
989b50d902SRodney W. Grimes.Ar file
999b50d902SRodney W. Grimesmay be specified which is usually
1000806dd92SEd Schouten.Pa /var/log/utx.log
1019b50d902SRodney W. Grimes(or
1020806dd92SEd Schouten.Pa /var/log/utx.log.[0-6]
1039b50d902SRodney W. Grimesdepending on site policy as
1040806dd92SEd Schouten.Pa utx.log
1059b50d902SRodney W. Grimescan grow quite large and daily versions may or may not
1069b50d902SRodney W. Grimesbe kept around after compression by
1079b50d902SRodney W. Grimes.Xr ac 8 ) .
1089b50d902SRodney W. GrimesThe
1090806dd92SEd Schouten.Pa utx.log
1109b50d902SRodney W. Grimesfile contains a record of every login, logout,
1119b50d902SRodney W. Grimescrash, shutdown and date change
1129b50d902SRodney W. Grimessince
1130806dd92SEd Schouten.Pa utx.log
1149b50d902SRodney W. Grimeswas last truncated or
1159b50d902SRodney W. Grimescreated.
1169b50d902SRodney W. Grimes.Pp
1179b50d902SRodney W. GrimesIf
1180806dd92SEd Schouten.Pa /var/log/utx.log
1199b50d902SRodney W. Grimesis being used as the file, the user name may be empty
1206a3e8b0aSRuslan Ermilovor one of the special characters '|', '}' and '~'.
1216a3e8b0aSRuslan ErmilovLogouts produce
1226a3e8b0aSRuslan Ermilovan output line without any user name.
1236a3e8b0aSRuslan ErmilovFor more information on the
1249b50d902SRodney W. Grimesspecial characters, see
1250806dd92SEd Schouten.Xr getutxent 3 .
1268358edb6STim J. Robbins.Sh ENVIRONMENT
127850a1debSTim J. RobbinsThe
12806e482e6SRuslan Ermilov.Ev COLUMNS , LANG , LC_ALL
129850a1debSTim J. Robbinsand
130850a1debSTim J. Robbins.Ev LC_TIME
131850a1debSTim J. Robbinsenvironment variables affect the execution of
1328358edb6STim J. Robbins.Nm
133850a1debSTim J. Robbinsas described in
134850a1debSTim J. Robbins.Xr environ 7 .
1359b50d902SRodney W. Grimes.Sh FILES
1360806dd92SEd Schouten.Bl -tag -width /var/log/utx.log.[0-6] -compact
1370806dd92SEd Schouten.It Pa /var/run/utx.active
1380806dd92SEd Schouten.It Pa /var/log/utx.log
1390806dd92SEd Schouten.It Pa /var/log/utx.log.[0-6]
1409b50d902SRodney W. Grimes.El
141a866e170SRuslan Ermilov.Sh EXIT STATUS
14238a99942STim J. Robbins.Ex -std
1439b50d902SRodney W. Grimes.Sh SEE ALSO
1449b50d902SRodney W. Grimes.Xr last 1 ,
1459b50d902SRodney W. Grimes.Xr users 1 ,
14638a99942STim J. Robbins.Xr w 1 ,
1470806dd92SEd Schouten.Xr getutxent 3
14838a99942STim J. Robbins.Sh STANDARDS
14938a99942STim J. RobbinsThe
15038a99942STim J. Robbins.Nm
15138a99942STim J. Robbinsutility conforms to
15238a99942STim J. Robbins.St -p1003.1-2001 .
1539b50d902SRodney W. Grimes.Sh HISTORY
1549b50d902SRodney W. GrimesA
1559b50d902SRodney W. Grimes.Nm
1569b50d902SRodney W. Grimescommand appeared in
157b8923d4cSWolfram Schneider.At v1 .
158