xref: /freebsd/usr.bin/who/who.1 (revision 85714224aefde2a8ca72e053531bd709d260871f)
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.\"
31*85714224SSergey Kandaurov.Dd Oct 28, 2011
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
39*85714224SSergey Kandaurov.Op Fl bHmqsTu
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
51*85714224SSergey Kandaurov.It Fl b
52*85714224SSergey KandaurovWrite the time and date of the last system reboot.
5338a99942STim J. Robbins.It Fl H
5438a99942STim J. RobbinsWrite column headings above the output.
5538a99942STim J. Robbins.It Fl m
5638a99942STim J. RobbinsShow information about the terminal attached to standard input only.
5738a99942STim J. Robbins.It Fl q
588c756f11SRuslan Ermilov.Dq "Quick mode" :
5938a99942STim J. RobbinsList the names and number of logged in users in columns.
6038a99942STim J. RobbinsAll other command line options are ignored.
6138a99942STim J. Robbins.It Fl s
6238a99942STim J. RobbinsShow the name, line and time fields only.
6338a99942STim J. RobbinsThis is the default.
6438a99942STim J. Robbins.It Fl T
6538a99942STim J. RobbinsIndicate whether each user is accepting messages.
6638a99942STim J. RobbinsOne of the following characters is written:
678c756f11SRuslan Ermilov.Pp
688c756f11SRuslan Ermilov.Bl -tag -width 1n -compact
698c756f11SRuslan Ermilov.It Li +
7038a99942STim J. RobbinsUser is accepting messages.
718c756f11SRuslan Ermilov.It Li \&-
7238a99942STim J. RobbinsUser is not accepting messages.
738c756f11SRuslan Ermilov.It Li \&?
7438a99942STim J. RobbinsAn error occurred.
7538a99942STim J. Robbins.El
7638a99942STim J. Robbins.It Fl u
7738a99942STim J. RobbinsShow idle time for each user in hours and minutes as
788c756f11SRuslan Ermilov.Ar hh Ns : Ns Ar mm ,
7938a99942STim J. Robbins.Ql \&.
808c756f11SRuslan Ermilovif the user has been idle less that a minute, and
818c756f11SRuslan Ermilov.Dq Li old
8238a99942STim J. Robbinsif the user has been idle more than 24 hours.
8338a99942STim J. Robbins.It Cm am I
8438a99942STim J. RobbinsEquivalent to
8538a99942STim J. Robbins.Fl m .
8638a99942STim J. Robbins.El
879b50d902SRodney W. Grimes.Pp
889b50d902SRodney W. GrimesBy default,
890abcff76SPhilippe Charnier.Nm
909b50d902SRodney W. Grimesgathers information from the file
910806dd92SEd Schouten.Pa /var/run/utx.active .
929b50d902SRodney W. GrimesAn alternate
939b50d902SRodney W. Grimes.Ar file
949b50d902SRodney W. Grimesmay be specified which is usually
950806dd92SEd Schouten.Pa /var/log/utx.log
969b50d902SRodney W. Grimes(or
970806dd92SEd Schouten.Pa /var/log/utx.log.[0-6]
989b50d902SRodney W. Grimesdepending on site policy as
990806dd92SEd Schouten.Pa utx.log
1009b50d902SRodney W. Grimescan grow quite large and daily versions may or may not
1019b50d902SRodney W. Grimesbe kept around after compression by
1029b50d902SRodney W. Grimes.Xr ac 8 ) .
1039b50d902SRodney W. GrimesThe
1040806dd92SEd Schouten.Pa utx.log
1059b50d902SRodney W. Grimesfile contains a record of every login, logout,
1069b50d902SRodney W. Grimescrash, shutdown and date change
1079b50d902SRodney W. Grimessince
1080806dd92SEd Schouten.Pa utx.log
1099b50d902SRodney W. Grimeswas last truncated or
1109b50d902SRodney W. Grimescreated.
1119b50d902SRodney W. Grimes.Pp
1129b50d902SRodney W. GrimesIf
1130806dd92SEd Schouten.Pa /var/log/utx.log
1149b50d902SRodney W. Grimesis being used as the file, the user name may be empty
1156a3e8b0aSRuslan Ermilovor one of the special characters '|', '}' and '~'.
1166a3e8b0aSRuslan ErmilovLogouts produce
1176a3e8b0aSRuslan Ermilovan output line without any user name.
1186a3e8b0aSRuslan ErmilovFor more information on the
1199b50d902SRodney W. Grimesspecial characters, see
1200806dd92SEd Schouten.Xr getutxent 3 .
1218358edb6STim J. Robbins.Sh ENVIRONMENT
122850a1debSTim J. RobbinsThe
12306e482e6SRuslan Ermilov.Ev COLUMNS , LANG , LC_ALL
124850a1debSTim J. Robbinsand
125850a1debSTim J. Robbins.Ev LC_TIME
126850a1debSTim J. Robbinsenvironment variables affect the execution of
1278358edb6STim J. Robbins.Nm
128850a1debSTim J. Robbinsas described in
129850a1debSTim J. Robbins.Xr environ 7 .
1309b50d902SRodney W. Grimes.Sh FILES
1310806dd92SEd Schouten.Bl -tag -width /var/log/utx.log.[0-6] -compact
1320806dd92SEd Schouten.It Pa /var/run/utx.active
1330806dd92SEd Schouten.It Pa /var/log/utx.log
1340806dd92SEd Schouten.It Pa /var/log/utx.log.[0-6]
1359b50d902SRodney W. Grimes.El
136a866e170SRuslan Ermilov.Sh EXIT STATUS
13738a99942STim J. Robbins.Ex -std
1389b50d902SRodney W. Grimes.Sh SEE ALSO
1399b50d902SRodney W. Grimes.Xr last 1 ,
1409b50d902SRodney W. Grimes.Xr users 1 ,
14138a99942STim J. Robbins.Xr w 1 ,
1420806dd92SEd Schouten.Xr getutxent 3
14338a99942STim J. Robbins.Sh STANDARDS
14438a99942STim J. RobbinsThe
14538a99942STim J. Robbins.Nm
14638a99942STim J. Robbinsutility conforms to
14738a99942STim J. Robbins.St -p1003.1-2001 .
1489b50d902SRodney W. Grimes.Sh HISTORY
1499b50d902SRodney W. GrimesA
1509b50d902SRodney W. Grimes.Nm
1519b50d902SRodney W. Grimescommand appeared in
152b8923d4cSWolfram Schneider.At v1 .
153