[BACK]Return to who.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / who

Annotation of src/usr.bin/who/who.1, Revision 1.19

1.19    ! jmc         1: .\"    $OpenBSD: who.1,v 1.18 2003/09/02 18:50:07 jmc Exp $
1.1       deraadt     2: .\"    $NetBSD: who.1,v 1.5 1994/12/07 04:28:47 jtc Exp $
                      3: .\"
                      4: .\" Copyright (c) 1986, 1991, 1993
                      5: .\"    The Regents of the University of California.  All rights reserved.
                      6: .\"
                      7: .\" Redistribution and use in source and binary forms, with or without
                      8: .\" modification, are permitted provided that the following conditions
                      9: .\" are met:
                     10: .\" 1. Redistributions of source code must retain the above copyright
                     11: .\"    notice, this list of conditions and the following disclaimer.
                     12: .\" 2. Redistributions in binary form must reproduce the above copyright
                     13: .\"    notice, this list of conditions and the following disclaimer in the
                     14: .\"    documentation and/or other materials provided with the distribution.
1.17      millert    15: .\" 3. Neither the name of the University nor the names of its contributors
1.1       deraadt    16: .\"    may be used to endorse or promote products derived from this software
                     17: .\"    without specific prior written permission.
                     18: .\"
                     19: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     20: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     21: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     22: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     23: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     24: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     25: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     26: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     27: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     28: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     29: .\" SUCH DAMAGE.
                     30: .\"
                     31: .\"     @(#)who.1      8.2 (Berkeley) 12/30/93
                     32: .\"
                     33: .Dd December 6, 1994
                     34: .Dt WHO 1
                     35: .Os
                     36: .Sh NAME
                     37: .Nm who
                     38: .Nd display who is logged in
                     39: .Sh SYNOPSIS
                     40: .Nm who
1.19    ! jmc        41: .Op Fl HmqTu
1.7       aaron      42: .Op Ar file
1.1       deraadt    43: .Nm who
                     44: .Ar am i
                     45: .Sh DESCRIPTION
1.7       aaron      46: The
                     47: .Nm
1.1       deraadt    48: utility displays a list of all users currently logged on, showing for
                     49: each user the login name, tty name, the date and time of login, and
                     50: hostname if not local.
                     51: .Pp
1.8       aaron      52: The options are as follows:
1.14      aaron      53: .Bl -tag -width Ds
1.19    ! jmc        54: .It Fl H
        !            55: Write column headings above the regular output.
1.1       deraadt    56: .It Fl m
1.10      aaron      57: Only print information about the current terminal.
                     58: This is the
1.1       deraadt    59: .Tn POSIX
                     60: way of saying
1.7       aaron      61: .Nm
1.1       deraadt    62: .Ar am i .
1.4       denny      63: .It Fl q
1.13      aaron      64: (Quick.)
                     65: List only the names and the number of users currently logged on.
1.11      aaron      66: When this option is used, all other options are ignored.
1.1       deraadt    67: .It Fl T
                     68: Print a character after the user name indicating the state of the
                     69: terminal line:
1.7       aaron      70: .Sq +
1.1       deraadt    71: if the terminal is writable;
1.7       aaron      72: .Sq \-
1.1       deraadt    73: if it is not;
                     74: and
1.18      jmc        75: .Sq \&?
1.1       deraadt    76: if a bad line is encountered.
                     77: .It Fl u
                     78: Print the idle time for each user.
                     79: .It Ar \&am I
1.7       aaron      80: Returns the invoker's real user name.
1.1       deraadt    81: .It Ar file
                     82: By default,
1.7       aaron      83: .Nm
1.1       deraadt    84: gathers information from the file
                     85: .Pa /var/run/utmp .
                     86: An alternate
                     87: .Ar file
                     88: may be specified which is usually
                     89: .Pa /var/log/wtmp
                     90: (or
                     91: .Pa /var/log/wtmp.[0-6]
                     92: depending on site policy as
                     93: .Pa wtmp
                     94: can grow quite large and daily versions may or may not
                     95: be kept around after compression by
                     96: .Xr ac 8 ) .
                     97: The
                     98: .Pa wtmp
                     99: file contains a record of every login, logout,
                    100: crash, shutdown and date change
                    101: since
                    102: .Pa wtmp
                    103: was last truncated or
                    104: created.
                    105: .El
                    106: .Pp
                    107: If
                    108: .Pa /var/log/wtmp
                    109: is being used as the file, the user name may be empty
1.10      aaron     110: or one of the special characters
                    111: .Ql | ,
                    112: .Ql } ,
                    113: and
                    114: .Ql \&~ .
                    115: Logouts produce an output line without any user name.
                    116: For more information on the special characters, see
1.1       deraadt   117: .Xr utmp 5 .
                    118: .Sh FILES
                    119: .Bl -tag -width /var/log/wtmp.[0-6] -compact
                    120: .It Pa /var/run/utmp
                    121: .It Pa /var/log/wtmp
                    122: .It Pa /var/log/wtmp.[0-6]
                    123: .El
                    124: .Sh SEE ALSO
                    125: .Xr last 1 ,
                    126: .Xr mesg 1 ,
                    127: .Xr users 1 ,
1.19    ! jmc       128: .Xr w 1 ,
1.1       deraadt   129: .Xr getuid 2 ,
                    130: .Xr utmp 5
1.9       aaron     131: .Sh STANDARDS
                    132: The
                    133: .Nm
                    134: utility is expected to conform to
                    135: .St -p1003.2-92 .
1.1       deraadt   136: .Sh HISTORY
                    137: A
                    138: .Nm
                    139: utility appeared in
1.16      mickey    140: .At v3 .