⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 who.html

📁 IEEE 1003.1-2003, Single Unix Specification v3
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta name="generator" content="HTML Tidy, see www.w3.org"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 --><!-- Copyright (c) 2001-2003 The Open Group, All Rights Reserved --><title>who</title></head><body bgcolor="white"><script type="text/javascript" language="JavaScript" src="../jscript/codes.js"></script><basefont size="3"> <a name="who"></a> <a name="tag_04_171"></a><!-- who --> <!--header start--><center><font size="2">The Open Group Base Specifications Issue 6<br>IEEE Std 1003.1, 2003 Edition<br>Copyright &copy; 2001-2003 The IEEE and The Open Group, All Rights reserved.</font></center><!--header end--><hr size="2" noshade><h4><a name="tag_04_171_01"></a>NAME</h4><blockquote>who - display who is on the system</blockquote><h4><a name="tag_04_171_02"></a>SYNOPSIS</h4><blockquote class="synopsis"><div class="box"><code><tt><sup>[<a href="javascript:open_code('UP')">UP</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> who</tt> <b>[</b><tt>-mTu</tt><b>]</b><tt><img src="../images/opt-end.gif" border="0"><br><br></tt><div class="box"><code><tt><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> who</tt><b>[</b><tt>-mu</tt><b>]</b><tt>-s</tt><b>[</b><tt>-bHlprt</tt><b>][</b><i>file</i><b>]</b><tt><br><br>who</tt> <b>[</b><tt>-mTu</tt><b>][</b><tt>-abdHlprt</tt><b>][</b><i>file</i><b>]</b><tt><br><br>who -q</tt> <b>[</b><i>file</i><b>]</b><tt><br><br>who am i<br><br> who am I <img src="../images/opt-end.gif" alt="[Option End]" border="0"></tt></code></div><tt><br></tt></code></div></blockquote><h4><a name="tag_04_171_03"></a>DESCRIPTION</h4><blockquote><p>The <i>who</i> utility shall list various pieces of information about accessible users. The domain of accessibility isimplementation-defined.</p><p><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">Based on the options given, <i>who</i> can also list the user's name, terminal line, login time, elapsed time since activityoccurred on the line, and the process ID of the command interpreter for each current system user. <img src="../images/opt-end.gif"alt="[Option End]" border="0"></p></blockquote><h4><a name="tag_04_171_04"></a>OPTIONS</h4><blockquote><p>The <i>who</i> utility shall conform to the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001, <a href="../basedefs/xbd_chap12.html#tag_12_02">Section 12.2, Utility Syntax Guidelines</a>.</p><p>The following options shall be supported. The metavariables, such as &lt;<i>line</i>&gt;, refer to fields described in theSTDOUT section.</p><dl compact><dt><b>-a</b></dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">Process the implementation-defined database or named file with the <b>-b</b>, <b>-d</b>, <b>-l</b>, <b>-p</b>, <b>-r</b>,<b>-t</b>, <b>-T</b> and <b>-u</b> options turned on. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt><b>-b</b></dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">Write the time and date of the last reboot. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt><b>-d</b></dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">Write a list of all processes that have expired and not been respawned by the <i>init</i> system process. The &lt;<i>exit</i>&gt;field shall appear for dead processes and contain the termination and exit values of the dead process. This can be useful indetermining why a process terminated. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt><b>-H</b></dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">Write column headings above the regular output. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt><b>-l</b></dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">(The letter ell.) List only those lines on which the system is waiting for someone to login. The &lt;<i>name</i>&gt; field shall be<b>LOGIN</b> in such cases. Other fields shall be the same as for user entries except that the &lt;<i>state</i>&gt; field does notexist. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt><b>-m</b></dt><dd>Output only information about the current terminal.</dd><dt><b>-p</b></dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">List any other process that is currently active and has been previously spawned by <i>init</i>. <img src="../images/opt-end.gif"alt="[Option End]" border="0"></dd><dt><b>-q</b></dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">(Quick.) List only the names and the number of users currently logged on. When this option is used, all other options shall beignored. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt><b>-r</b></dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">Write the current <i>run-level</i> of the <i>init</i> process. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt><b>-s</b></dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">List only the &lt;<i>name</i>&gt;, &lt;<i>line</i>&gt;, and &lt;<i>time</i>&gt; fields. This is the default case. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt><b>-t</b></dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">Indicate the last change to the system clock. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt><b>-T</b></dt><dd>Show the state of each terminal, as described in the STDOUT section.</dd><dt><b>-u</b></dt><dd>Write &quot;idle time&quot; for each displayed user in addition to any other information. The idle time is the time since any activityoccurred on the user's terminal. The method of determining this is unspecified. <sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> &nbsp;This optionshall list only those users who are currently logged in. The &lt;<i>name</i>&gt; is the user's login name. The &lt;<i>line</i>&gt;is the name of the line as found in the directory <b>/dev</b>. The &lt;<i>time</i>&gt; is the time that the user logged in. The&lt;<i>activity</i>&gt; is the number of hours and minutes since activity last occurred on that particular line. A dot indicatesthat the terminal has seen activity in the last minute and is therefore &quot;current&quot;. If more than twenty-four hours have elapsed orthe line has not been used since boot time, the entry shall be marked &lt;<i>old</i>&gt;. This field is useful when trying todetermine whether a person is working at the terminal or not. The &lt;<i>pid</i>&gt; is the process ID of the user's login process.<img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd></dl></blockquote><h4><a name="tag_04_171_05"></a>OPERANDS</h4><blockquote><p><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">The following operands shall be supported:</p><dl compact><dt><b>am&nbsp;i</b>,&nbsp;<b>am&nbsp;I</b></dt><dd>In the POSIX locale, limit the output to describing the invoking user, equivalent to the <b>-m</b> option. The <b>am</b> and<b>i</b> or <b>I</b> must be separate arguments.</dd><dt><i>file</i></dt><dd>Specify a pathname of a file to substitute for the implementation-defined database of logged-on users that <i>who</i> uses bydefault. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd></dl></blockquote><h4><a name="tag_04_171_06"></a>STDIN</h4><blockquote><p>Not used.</p></blockquote><h4><a name="tag_04_171_07"></a>INPUT FILES</h4><blockquote><p>None.</p></blockquote><h4><a name="tag_04_171_08"></a>ENVIRONMENT VARIABLES</h4><blockquote><p>The following environment variables shall affect the execution of <i>who</i>:</p><dl compact><dt><i>LANG</i></dt><dd>Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume ofIEEE&nbsp;Std&nbsp;1003.1-2001, <a href="../basedefs/xbd_chap08.html#tag_08_02">Section 8.2, Internationalization Variables</a> forthe precedence of internationalization variables used to determine the values of locale categories.)</dd><dt><i>LC_ALL</i></dt><dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd><dt><i>LC_CTYPE</i></dt><dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -