Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/./man/man1/who.1
Real path: /usr/share/man/man1/who.1
Zurück
'\" te .\" Copyright (c) 1989, AT&T. All rights reserved. .\" Copyright (c) 2000, 2022, Oracle and/or its affiliates. .\" Portions Copyright (c) 1992, The X/Open Company Ltd. All rights reserved. .\" Oracle gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/. .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions 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. This notice shall appear on any product containing this material. .TH who 1 "29 Nov 2022" "Oracle Solaris 11.4" "User Commands" .SH NAME who \- who is on the system .SH SYNOPSIS .LP .nf \fB/usr/bin/who\fR [\fB-a | --all\fR] [\fB-b\fR | \fB--boot\fR] [\fB-d\fR | \fB--dead\fR] [\fB-H\fR | \fB--heading\fR] [\fB-l\fR | \fB--login\fR] [\fB--lookup\fR] [\fB-m\fR] [\fB-p\fR | \fB--process\fR] [\fB-q\fR | \fB--count\fR] [\fB-r\fR | \fB--runlevel\fR] [\fB-s\fR | \fB--short\fR] [\fB-t\fR | \fB--time\fR] [\fB-T\fR | \fB-w\fR | \fB--mesg\fR | \fB--message\fR | \fB--writeable\fR] [\fB-u\fR | \fB--users\fR] [\fIfile\fR] .fi .LP .nf \fB/usr/bin/who\fR \fB-q\fR | \fB--count\fR [\fB-n\fR \fBx\fR] [\fIfile\fR] .fi .LP .nf \fB/usr/bin/who\fR \fBam i\fR .fi .LP .nf \fB/usr/bin/who\fR \fBam I\fR .fi .LP .nf \fB/usr/xpg4/bin/who\fR [\fB-abdHlmpqrtTu\fR] [\fIfile\fR] .fi .LP .nf \fB/usr/xpg4/bin/who\fR \fB-q\fR [\fB-n\fR \fIx\fR] [\fIfile\fR] .fi .LP .nf \fB/usr/xpg4/bin/who\fR \fB-s\fR [\fB-bdHlmpqrtu\fR] [\fIfile\fR] .fi .LP .nf \fB/usr/xpg4/bin/who\fR \fBam i\fR .fi .LP .nf \fB/usr/xpg4/bin/who\fR \fBam I\fR .fi .SH DESCRIPTION .sp .LP The \fBwho\fR utility can 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 (shell) for each current UNIX system user. It examines the \fB/var/adm/utmpx\fR file to obtain its information. If \fIfile\fR is given, that file (which must be in \fButmpx\fR(5) format) is examined. Usually, \fIfile\fR will be \fB/var/adm/wtmpx\fR, which contains a history of all the logins since the file was last created. .sp .LP The general format for output is: .sp .in +2 .nf \fIname\fR [\fIstate\fR] \fIline time\fR [\fIidle\fR] [\fIpid\fR] [\fIcomment\fR] [\fIexit\fR] [(\fIhost\fR)] .fi .in -2 .sp .sp .LP where: .sp .ne 2 .mk .na \fB\fIname\fR\fR .ad .RS 11n .rt User's login name .RE .sp .ne 2 .mk .na \fB\fIstate\fR\fR .ad .RS 11n .rt Capability of writing to the terminal .RE .sp .ne 2 .mk .na \fB\fIline\fR\fR .ad .RS 11n .rt Name of the line found in \fB/dev\fR .RE .sp .ne 2 .mk .na \fB\fItime\fR\fR .ad .RS 11n .rt Time since user's login .RE .sp .ne 2 .mk .na \fB\fIidle\fR\fR .ad .RS 11n .rt Time elapsed since the user's last activity .RE .sp .ne 2 .mk .na \fB\fIpid\fR\fR .ad .RS 11n .rt User's process id .RE .sp .ne 2 .mk .na \fB\fIcomment\fR\fR .ad .RS 11n .rt Comment line in \fBinittab\fR(5) .RE .sp .ne 2 .mk .na \fB\fIexit\fR\fR .ad .RS 11n .rt Exit status for dead processes .RE .sp .ne 2 .mk .na \fB\fIhost\fR\fR .ad .RS 11n .rt Host from which login originated .RE .SH OPTIONS .sp .LP The following options are supported in \fB/usr/bin/who\fR: .sp .ne 2 .mk .na \fB\fB-a\fR, \fB--all\fR\fR .ad .br .sp .6 .RS 4n Processes \fB/var/adm/utmpx\fR or the named \fIfile\fR with \fB-b\fR, \fB-d\fR, \fB-l\fR, \fB-p\fR, \fB-r\fR, \fB-t\fR, \fB-T\fR, and \fB-u\fR options turned on. .RE .sp .ne 2 .mk .na \fB\fB-b\fR, \fB--boot\fR\fR .ad .br .sp .6 .RS 4n Indicates the time and date of the last reboot. .RE .sp .ne 2 .mk .na \fB\fB-d\fR, \fB--dead\fR\fR .ad .br .sp .6 .RS 4n Displays all processes that have expired and not been respawned by \fBinit\fR. The \fBexit\fR field appears for dead processes and contains the termination and exit values (as returned by \fBwait\fR(3C)), of the dead process. This can be useful in determining why a process terminated. .RE .sp .ne 2 .mk .na \fB\fB-H\fR, \fB--heading\fR\fR .ad .br .sp .6 .RS 4n Outputs column headings above the regular output. .RE .sp .ne 2 .mk .na \fB\fB-l\fR, \fB--login\fR\fR .ad .br .sp .6 .RS 4n Lists only those lines on which the system is waiting for someone to login. The \fIname\fR field is \fBLOGIN\fR in such cases. Other fields are the same as for user entries except that the \fIstate\fR field does not exist. .RE .sp .ne 2 .mk .na \fB\fB--lookup\fR\fR .ad .br .sp .6 .RS 4n Performs a lookup of the host in the configured name services to find the canonical (first defined) name of the host (see NOTES). .RE .sp .ne 2 .mk .na \fB\fB-m\fR\fR .ad .br .sp .6 .RS 4n Outputs only information about the current terminal. .RE .sp .ne 2 .mk .na \fB\fB-n\fR \fIx\fR\fR .ad .br .sp .6 .RS 4n Takes a numeric argument, \fIx\fR, which specifies the number of users to display per line. \fIx\fR must be at least \fB1\fR. The \fB-n\fR option can only be used with \fB-q\fR. .RE .sp .ne 2 .mk .na \fB\fB-p\fR, \fB--process\fR\fR .ad .br .sp .6 .RS 4n Lists any other process that is currently active and has been previously spawned by \fBinit\fR. The \fIname\fR field is the name of the program executed by \fBinit\fR as found in \fB/usr/sbin/inittab\fR. The \fIstate\fR, \fIline\fR, and \fIidle\fR fields have no meaning. The \fIcomment\fR field shows the \fBid\fR field of the line from \fB/usr/sbin/inittab\fR that spawned this process. See \fBinittab\fR(5). .RE .sp .ne 2 .mk .na \fB\fB-q\fR, \fB--count\fR\fR .ad .br .sp .6 .RS 4n (Quick \fBwho\fR) Displays only the names and the number of users currently logged on. When this option is used, all options other than \fB-n\fR are ignored. .RE .sp .ne 2 .mk .na \fB\fB-r\fR, \fB--runlevel\fR\fR .ad .br .sp .6 .RS 4n Indicates the current \fIrun-level\fR of the \fBinit\fR process. .RE .sp .ne 2 .mk .na \fB\fB-s\fR, \fB--short\fR\fR .ad .br .sp .6 .RS 4n (Default) Lists only the \fIname\fR, \fIline\fR, \fItime\fR, and (if the host field is present in the utmpx entry) \fIhost\fR fields. .RE .sp .ne 2 .mk .na \fB\fB-T\fR, \fB--mesg\fR, \fB--message\fR\fR .ad .br .sp .6 .RS 4n Same as the \fB-s\fR option, except that the \fIstate\fR, \fIidle\fR, \fIpid\fR, and \fIcomment\fR fields are also written. \fIstate\fR is one of the following characters: .sp .ne 2 .mk .na \fB\fB+\fR\fR .ad .RS 8n .rt The terminal allows write access to other users. .RE .sp .ne 2 .mk .na \fB\fB\(mi\fR\fR .ad .RS 8n .rt The terminal denies write access to other users. .RE .sp .ne 2 .mk .na \fB\fB?\fR\fR .ad .RS 8n .rt The terminal write-access state cannot be determined. .RE .RE .sp .ne 2 .mk .na \fB\fB-t\fR, \fB--time\fR\fR .ad .br .sp .6 .RS 4n Indicates the last change to the system clock (using the \fBdate\fR utility) by \fBroot\fR. See \fBsu\fR(8) and \fBdate\fR(1). .RE .sp .ne 2 .mk .na \fB\fB-u\fR, \fB--users\fR\fR .ad .br .sp .6 .RS 4n Lists only those users who are currently logged in. The \fIname\fR is the user's login name. The \fIline\fR is the name of the line as found in the directory \fB/dev\fR. The \fItime\fR is the time that the user logged in. The \fIidle\fR column contains the number of hours and minutes since activity last occurred on that particular line. A dot (\fB.\fR) 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 is marked \fBold\fR. This field is useful when trying to determine whether a person is working at the terminal or not. The \fIpid\fR is the process-ID of the user's shell. The \fIcomment\fR is the comment field associated with this line as found in \fB/usr/sbin/inittab\fR (see \fBinittab\fR(5)). This can contain information about where the terminal is located, the telephone number of the dataset, type of terminal if hard-wired, and so forth. .RE .sp .ne 2 .mk .na \fB\fB-w\fR, \fB--writeable\fR\fR .ad .br .sp .6 .RS 4n Same as \fB-T\fR option .RE .SS "/usr/xpg4/bin/who" .sp .LP The following options are supported in \fB/usr/xpg4/bin/who\fR: .sp .ne 2 .mk .na \fB\fB-a\fR\fR .ad .RS 6n .rt Processes \fB/var/adm/utmpx\fR or the named \fIfile\fR with \fB-b\fR, \fB-d\fR, \fB-l\fR, \fB-p\fR, \fB-r\fR, \fB-t\fR, \fB-T\fR, and \fB-u\fR options turned on. .RE .sp .ne 2 .mk .na \fB\fB-b\fR\fR .ad .RS 6n .rt Indicates the time and date of the last reboot. .RE .sp .ne 2 .mk .na \fB\fB-d\fR\fR .ad .RS 6n .rt Displays all processes that have expired and not been respawned by \fBinit\fR. The \fBexit\fR field appears for dead processes and contains the termination and exit values (as returned by \fBwait\fR(3C)), of the dead process. This can be useful in determining why a process terminated. .RE .sp .ne 2 .mk .na \fB\fB-H\fR\fR .ad .RS 6n .rt Outputs column headings above the regular output. .RE .sp .ne 2 .mk .na \fB\fB-l\fR\fR .ad .RS 6n .rt Lists only those lines on which the system is waiting for someone to login. The \fIname\fR field is \fBLOGIN\fR in such cases. Other fields are the same as for user entries except that the \fIstate\fR field does not exist. .RE .sp .ne 2 .mk .na \fB\fB-m\fR\fR .ad .RS 6n .rt Outputs only information about the current terminal. .RE .sp .ne 2 .mk .na \fB\fB-p\fR\fR .ad .RS 6n .rt Lists any other process that is currently active and has been previously spawned by \fBinit\fR. The \fIname\fR field is the name of the program executed by \fBinit\fR as found in \fB/usr/sbin/inittab\fR. The \fIstate\fR, \fIline\fR, and \fIidle\fR fields have no meaning. The \fIcomment\fR field shows the \fBid\fR field of the line from \fB/usr/sbin/inittab\fR that spawned this process. See \fBinittab\fR(5). .RE .sp .ne 2 .mk .na \fB\fB-q\fR\fR .ad .RS 6n .rt (Quick \fBwho\fR) Displays only the names and the number of users currently logged on. When this option is used, all options other than \fB-n\fR are ignored. .RE .sp .ne 2 .mk .na \fB\fB-r\fR\fR .ad .RS 6n .rt Indicates the current run-level of the init process. .RE .sp .ne 2 .mk .na \fB\fB-s\fR\fR .ad .RS 6n .rt (Default) Lists only the name, line, and time fields. .RE .sp .ne 2 .mk .na \fB\fB-T\fR\fR .ad .RS 6n .rt Same as the \fB-s\fR option, except that the \fIstate\fR field is also written. \fIstate\fR is one of the characters listed under the \fB/usr/bin/who\fR version of this option. If the \fB-u\fR option is used with \fB-T\fR, the idle time is added to the end of the previous format. .RE .sp .ne 2 .mk .na \fB\fB-t\fR\fR .ad .RS 6n .rt Indicates the last change to the system clock (using the \fBdate\fR utility) by \fBroot\fR. See \fBsu\fR(8) and \fBdate\fR(1). .RE .sp .ne 2 .mk .na \fB\fB-u\fR\fR .ad .RS 6n .rt Lists only those users who are currently logged in. The \fIname\fR is the user's login name. The \fIline\fR is the name of the line as found in the directory \fB/dev\fR. The \fItime\fR is the time that the user logged in. The \fIidle\fR column contains the number of hours and minutes since activity last occurred on that particular line. A dot (\fB.\fR) 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 is marked \fBold\fR. This field is useful when trying to determine whether a person is working at the terminal or not. The \fIpid\fR is the process-ID of the user's shell. The \fIcomment\fR is the comment field associated with this line as found in \fB/usr/sbin/inittab\fR (see \fBinittab\fR(5)). This can contain information about where the terminal is located, the telephone number of the dataset, type of terminal if hard-wired, and so forth. .RE .SH OPERANDS .sp .LP The following operands are supported: .sp .ne 2 .mk .na \fB\fBam\fR \fBi\fR\fR .ad .br .na \fB\fBam\fR \fBI\fR\fR .ad .RS 8n .rt In the C locale, limits the output to describing the invoking user, equivalent to the \fB-m\fR option. The \fBam\fR and \fBi\fR or \fBI\fR must be separate arguments. .RE .sp .ne 2 .mk .na \fB\fIfile\fR\fR .ad .RS 8n .rt Specifies a path name of a file to substitute for the database of logged-on users that \fBwho\fR uses by default. .RE .SH ENVIRONMENT VARIABLES .sp .LP See \fBenviron\fR(7) for descriptions of the following environment variables that affect the execution of \fBwho\fR: \fBLANG\fR, \fBLC_ALL\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, \fBLC_TIME\fR, and \fBNLSPATH\fR. .SH EXIT STATUS .sp .LP The following exit values are returned: .sp .ne 2 .mk .na \fB\fB0\fR\fR .ad .RS 6n .rt Successful completion. .RE .sp .ne 2 .mk .na \fB\fB>0\fR\fR .ad .RS 6n .rt An error occurred. .RE .SH FILES .sp .ne 2 .mk .na \fB\fB/usr/sbin/inittab\fR\fR .ad .RS 21n .rt Script for \fBinit\fR .RE .sp .ne 2 .mk .na \fB\fB/var/adm/utmpx\fR\fR .ad .RS 21n .rt Current user and accounting information .RE .sp .ne 2 .mk .na \fB\fB/var/adm/wtmpx\fR\fR .ad .RS 21n .rt Historic user and accounting information .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .SS "/usr/bin/who" .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Availability system/core-os _ Interface Stability Committed .TE .sp .SS "/usr/xpg4/bin/who" .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Availability system/xopen/xcu4 _ Interface Stability Committed _ Standard See \fBstandards\fR(7). .TE .sp .SH SEE ALSO .sp .LP \fBdate\fR(1), \fBlogin\fR(1), \fBmesg\fR(1), \fBwait\fR(3C), \fBinittab\fR(5), \fButmpx\fR(5), \fBattributes\fR(7), \fBenviron\fR(7), \fBstandards\fR(7), \fBinit\fR(8), \fBsu\fR(8) .SH NOTES .sp .LP When the system is in the single-user state, \fBwho\fR returns no output. Since \fB/var/adm/utmpx\fR is updated at login time and there is no login in single-user state, \fBwho\fR cannot report accurately on this state. The command, \fBwho am i\fR, however, returns the correct information. .sp .LP The \fB--lookup\fR option is used to query the configured name services to try to locate the so-called canonical name for the hostname specified in the \fButmpx\fR entry. This will return the first name returned by the \fBgetaddrinfo\fR(3C) function supplied with the \fBAI_CANONNAME\fR hint. .sp .LP The \fIhost\fR field is set by the login software, and may include information other than a network address or hostname, such as an X Window System \fBDISPLAY\fR id or a Solaris zone name. .SH HISTORY .sp .LP Support for the \fB--all\fR, \fB--boot\fR, \fB--count\fR, \fB--dead\fR, \fB--heading\fR, \fB--help\fR, \fB--login\fR, \fB--lookup\fR, \fB--mesg\fR, \fB--message\fR, \fB--process\fR, \fB--runlevel\fR, \fB--short\fR, \fB--time\fR, \fB--users\fR, \fB--writeable\fR, and \fB-w\fR options was added to \fB/usr/bin/who\fR in Solaris 11.4.0. .sp .LP Support for the \fB-m\fR option was added to both \fBwho\fR commands in Solaris 2.5. .sp .LP The \fB/usr/xpg4/bin/who\fR command was added in Solaris 2.5. .sp .LP Support for the \fB-a\fR, \fB-b\fR, \fB-d\fR, \fB-H\fR, \fB-l\fR, \fB-n\fR, \fB-p\fR, \fB-q\fR, \fB-r\fR, \fB-s\fR, \fB-t\fR, \fB-T\fR, and \fB-u\fR options was added to \fB/usr/bin/who\fR in Solaris 2.0. .sp .LP The \fBwho\fR command, with support for the \fBam i\fR and \fIfile\fR arguments has been present in all Sun and Oracle releases of Solaris.