aboutsummaryrefslogtreecommitdiffstats
path: root/man-pages-posix-2003/man1p/who.1p
diff options
context:
space:
mode:
Diffstat (limited to 'man-pages-posix-2003/man1p/who.1p')
-rw-r--r--man-pages-posix-2003/man1p/who.1p316
1 files changed, 316 insertions, 0 deletions
diff --git a/man-pages-posix-2003/man1p/who.1p b/man-pages-posix-2003/man1p/who.1p
new file mode 100644
index 0000000..4da3cd0
--- /dev/null
+++ b/man-pages-posix-2003/man1p/who.1p
@@ -0,0 +1,316 @@
+.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
+.TH "WHO" 1P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
+.\" who
+.SH PROLOG
+This manual page is part of the POSIX Programmer's Manual.
+The Linux implementation of this interface may differ (consult
+the corresponding Linux manual page for details of Linux behavior),
+or the interface may not be implemented on Linux.
+.SH NAME
+who \- display who is on the system
+.SH SYNOPSIS
+.LP
+\fBwho\fP \fB[\fP\fB-mTu\fP\fB]\fP\fB
+.br
+.sp
+\fP
+.LP
+\fBwho\fP
+\fB[\fP\fB-mu\fP\fB]\fP\fB-s\fP\fB[\fP\fB-bHlprt\fP\fB][\fP\fIfile\fP\fB]\fP\fB
+.br
+.sp
+who\fP \fB[\fP\fB-mTu\fP\fB][\fP\fB-abdHlprt\fP\fB][\fP\fIfile\fP\fB]\fP\fB
+.br
+.sp
+who -q\fP \fB[\fP\fIfile\fP\fB]\fP\fB
+.br
+.sp
+who am i
+.br
+.sp
+who am I \fP
+\fB
+.br
+\fP
+.SH DESCRIPTION
+.LP
+The \fIwho\fP utility shall list various pieces of information about
+accessible users. The domain of accessibility is
+implementation-defined.
+.LP
+Based on the options given, \fIwho\fP can also list the user's name,
+terminal line, login time, elapsed time since activity
+occurred on the line, and the process ID of the command interpreter
+for each current system user.
+.SH OPTIONS
+.LP
+The \fIwho\fP utility shall conform to the Base Definitions volume
+of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
+.LP
+The following options shall be supported. The metavariables, such
+as <\fIline\fP>, refer to fields described in the
+STDOUT section.
+.TP 7
+\fB-a\fP
+Process the implementation-defined database or named file with the
+\fB-b\fP, \fB-d\fP, \fB-l\fP, \fB-p\fP, \fB-r\fP,
+\fB-t\fP, \fB-T\fP and \fB-u\fP options turned on.
+.TP 7
+\fB-b\fP
+Write the time and date of the last reboot.
+.TP 7
+\fB-d\fP
+Write a list of all processes that have expired and not been respawned
+by the \fIinit\fP system process. The <\fIexit\fP>
+field shall appear for dead processes and contain the termination
+and exit values of the dead process. This can be useful in
+determining why a process terminated.
+.TP 7
+\fB-H\fP
+Write column headings above the regular output.
+.TP 7
+\fB-l\fP
+(The letter ell.) List only those lines on which the system is waiting
+for someone to login. The <\fIname\fP> field shall be
+\fBLOGIN\fP in such cases. Other fields shall be the same as for user
+entries except that the <\fIstate\fP> field does not
+exist.
+.TP 7
+\fB-m\fP
+Output only information about the current terminal.
+.TP 7
+\fB-p\fP
+List any other process that is currently active and has been previously
+spawned by \fIinit\fP.
+.TP 7
+\fB-q\fP
+(Quick.) List only the names and the number of users currently logged
+on. When this option is used, all other options shall be
+ignored.
+.TP 7
+\fB-r\fP
+Write the current \fIrun-level\fP of the \fIinit\fP process.
+.TP 7
+\fB-s\fP
+List only the <\fIname\fP>, <\fIline\fP>, and <\fItime\fP> fields.
+This is the default case.
+.TP 7
+\fB-t\fP
+Indicate the last change to the system clock.
+.TP 7
+\fB-T\fP
+Show the state of each terminal, as described in the STDOUT section.
+.TP 7
+\fB-u\fP
+Write "idle time" for each displayed user in addition to any other
+information. The idle time is the time since any activity
+occurred on the user's terminal. The method of determining this is
+unspecified. This option
+shall list only those users who are currently logged in. The <\fIname\fP>
+is the user's login name. The <\fIline\fP>
+is the name of the line as found in the directory \fB/dev\fP. The
+<\fItime\fP> is the time that the user logged in. The
+<\fIactivity\fP> is the number of hours and minutes since activity
+last occurred on that particular line. A dot indicates
+that the terminal has seen activity in the last minute and is therefore
+"current". If more than twenty-four hours have elapsed or
+the line has not been used since boot time, the entry shall be marked
+<\fIold\fP>. This field is useful when trying to
+determine whether a person is working at the terminal or not. The
+<\fIpid\fP> is the process ID of the user's login process.
+.sp
+.SH OPERANDS
+.LP
+The following operands shall be supported:
+.TP 7
+\fBam\ i\fP,\ \fBam\ I\fP
+In the POSIX locale, limit the output to describing the invoking user,
+equivalent to the \fB-m\fP option. The \fBam\fP and
+\fBi\fP or \fBI\fP must be separate arguments.
+.TP 7
+\fIfile\fP
+Specify a pathname of a file to substitute for the implementation-defined
+database of logged-on users that \fIwho\fP uses by
+default.
+.sp
+.SH STDIN
+.LP
+Not used.
+.SH INPUT FILES
+.LP
+None.
+.SH ENVIRONMENT VARIABLES
+.LP
+The following environment variables shall affect the execution of
+\fIwho\fP:
+.TP 7
+\fILANG\fP
+Provide a default value for the internationalization variables that
+are unset or null. (See the Base Definitions volume of
+IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
+for
+the precedence of internationalization variables used to determine
+the values of locale categories.)
+.TP 7
+\fILC_ALL\fP
+If set to a non-empty string value, override the values of all the
+other internationalization variables.
+.TP 7
+\fILC_CTYPE\fP
+Determine the locale for the interpretation of sequences of bytes
+of text data as characters (for example, single-byte as
+opposed to multi-byte characters in arguments).
+.TP 7
+\fILC_MESSAGES\fP
+Determine the locale that should be used to affect the format and
+contents of diagnostic messages written to standard
+error.
+.TP 7
+\fILC_TIME\fP
+Determine the locale used for the format and contents of the date
+and time strings.
+.TP 7
+\fINLSPATH\fP
+Determine the location of message catalogs for the processing of \fILC_MESSAGES
+\&.\fP
+.TP 7
+\fITZ\fP
+Determine the timezone used when writing date and time information.
+If \fITZ\fP is unset or null, an unspecified default
+timezone shall be used.
+.sp
+.SH ASYNCHRONOUS EVENTS
+.LP
+Default.
+.SH STDOUT
+.LP
+The \fIwho\fP utility shall write its default format to the standard
+output in an implementation-defined format, subject only
+to the requirement of containing the information described above.
+.LP
+XSI-conformant systems shall write the default information to the
+standard output in the following general format:
+.sp
+.RS
+.nf
+
+\fB<\fP\fIname\fP\fB>\fP\fB[\fP\fB<\fP\fIstate\fP\fB>\fP\fB]\fP\fB<\fP\fIline\fP\fB><\fP\fItime\fP\fB>\fP\fB[\fP\fB<\fP\fIactivity\fP\fB>\fP\fB][\fP\fB<\fP\fIpid\fP\fB>\fP\fB][\fP\fB<\fP\fIcomment\fP\fB>\fP\fB][\fP\fB<\fP\fIexit\fP\fB>\fP\fB]\fP \fB
+\fP
+.fi
+.RE
+.LP
+The following format shall be used for the \fB-T\fP option:
+.sp
+.RS
+.nf
+
+\fB"%s %c %s %s\\n" <\fP\fIname\fP\fB>, <\fP\fIterminal state\fP\fB>, <\fP\fIterminal name\fP\fB>,
+ <\fP\fItime of login\fP\fB>
+\fP
+.fi
+.RE
+.LP
+where <\fIterminal\ state\fP> is one of the following characters:
+.TP 7
+\fB+\fP
+The terminal allows write access to other users.
+.TP 7
+\fB-\fP
+The terminal denies write access to other users.
+.TP 7
+\fB?\fP
+The terminal write-access state cannot be determined.
+.sp
+.LP
+In the POSIX locale, the <\fItime\ of\ login\fP> shall be equivalent
+in format to the output of:
+.sp
+.RS
+.nf
+
+\fBdate +"%b %e %H:%M"
+\fP
+.fi
+.RE
+.LP
+If the \fB-u\fP option is used with \fB-T\fP, the idle time shall
+be added to the end of the previous format in an unspecified
+format.
+.SH STDERR
+.LP
+The standard error shall be used only for diagnostic messages.
+.SH OUTPUT FILES
+.LP
+None.
+.SH EXTENDED DESCRIPTION
+.LP
+None.
+.SH EXIT STATUS
+.LP
+The following exit values shall be returned:
+.TP 7
+\ 0
+Successful completion.
+.TP 7
+>0
+An error occurred.
+.sp
+.SH CONSEQUENCES OF ERRORS
+.LP
+Default.
+.LP
+\fIThe following sections are informative.\fP
+.SH APPLICATION USAGE
+.LP
+The name \fIinit\fP used for the system process is the most commonly
+used on historical systems, but it may vary.
+.LP
+The "domain of accessibility" referred to is a broad concept that
+permits interpretation either on a very secure basis or even
+to allow a network-wide implementation like the historical \fIrwho\fP.
+.SH EXAMPLES
+.LP
+None.
+.SH RATIONALE
+.LP
+Due to differences between historical implementations, the base options
+provided were a compromise to allow users to work with
+those functions. The standard developers also considered removing
+all the options, but felt that these options offered users
+valuable functionality. Additional options to match historical systems
+are available on XSI-conformant systems.
+.LP
+It is recognized that the \fIwho\fP command may be of limited usefulness,
+especially in a multi-level secure environment. The
+standard developers considered, however, that having some standard
+method of determining the "accessibility" of other users would
+aid user portability.
+.LP
+No format was specified for the default \fIwho\fP output for systems
+not supporting the XSI Extension. In such a user-oriented
+command, designed only for human use, this was not considered to be
+a deficiency.
+.LP
+The format of the terminal name is unspecified, but the descriptions
+of \fIps\fP, \fItalk\fP, and \fIwrite\fP require that they use the
+same
+format.
+.LP
+It is acceptable for an implementation to produce no output for an
+invocation of \fIwho\fP \fBmil\fP.
+.SH FUTURE DIRECTIONS
+.LP
+None.
+.SH SEE ALSO
+.LP
+\fImesg\fP
+.SH COPYRIGHT
+Portions of this text are reprinted and reproduced in electronic form
+from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
+-- Portable Operating System Interface (POSIX), The Open Group Base
+Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
+Electrical and Electronics Engineers, Inc and The Open Group. In the
+event of any discrepancy between this version and the original IEEE and
+The Open Group Standard, the original IEEE and The Open Group Standard
+is the referee document. The original Standard can be obtained online at
+http://www.opengroup.org/unix/online.html .