logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

who.1p (9986B)


  1. '\" et
  2. .TH WHO "1P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. who
  12. \(em display who is on the system
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. who \fB[\fR-mTu\fB] [\fR-abdHlprt\fB] [\fIfile\fB]\fR
  17. .P
  18. who \fB[\fR-mu\fB] \fR-s\fB [\fR-bHlprt\fB] [\fIfile\fB]\fR
  19. .P
  20. who -q \fB[\fIfile\fB]\fR
  21. .P
  22. who am i
  23. .P
  24. who am I
  25. .fi
  26. .SH DESCRIPTION
  27. The
  28. .IR who
  29. utility shall list various pieces of information about accessible
  30. users. The domain of accessibility is implementation-defined.
  31. .P
  32. Based on the options given,
  33. .IR who
  34. can also list the user's name, terminal line, login time, elapsed time
  35. since activity occurred on the line, and the process ID of the command
  36. interpreter for each current system user.
  37. .SH OPTIONS
  38. The
  39. .IR who
  40. utility shall conform to the Base Definitions volume of POSIX.1\(hy2017,
  41. .IR "Section 12.2" ", " "Utility Syntax Guidelines".
  42. .P
  43. The following options shall be supported. The metavariables, such as
  44. <\fIline\fP>, refer to fields described in the STDOUT section.
  45. .IP "\fB\-a\fP" 10
  46. Process the implementation-defined database or named file with the
  47. .BR \-b ,
  48. .BR \-d ,
  49. .BR \-l ,
  50. .BR \-p ,
  51. .BR \-r ,
  52. .BR \-t ,
  53. .BR \-T
  54. and
  55. .BR \-u
  56. options turned on.
  57. .IP "\fB\-b\fP" 10
  58. Write the time and date of the last system reboot. The system reboot
  59. time is the time at which the implementation is able to commence
  60. running processes.
  61. .IP "\fB\-d\fP" 10
  62. Write a list of all processes that have expired and not been respawned
  63. by the
  64. .IR init
  65. system process. The <\fIexit\fP> field shall appear for dead processes
  66. and contain the termination and exit values of the dead process. This
  67. can be useful in determining why a process terminated.
  68. .IP "\fB\-H\fP" 10
  69. Write column headings above the regular output.
  70. .IP "\fB\-l\fP" 10
  71. (The letter ell.) List only those lines on which the system is waiting
  72. for someone to login. The <\fIname\fP> field shall be
  73. .BR LOGIN
  74. in such cases. Other fields shall be the same as for user entries
  75. except that the <\fIstate\fP> field does not exist.
  76. .IP "\fB\-m\fP" 10
  77. Output only information about the current terminal.
  78. .IP "\fB\-p\fP" 10
  79. List any other process that is currently active and has been previously
  80. spawned by
  81. .IR init .
  82. .IP "\fB\-q\fP" 10
  83. (Quick.) List only the names and the number of users currently logged
  84. on. When this option is used, all other options shall be ignored.
  85. .IP "\fB\-r\fP" 10
  86. Write the current
  87. .IR run-level
  88. of the
  89. .IR init
  90. process.
  91. .IP "\fB\-s\fP" 10
  92. List only the <\fIname\fR>, <\fIline\fR>, and <\fItime\fR> fields.
  93. This is the default case.
  94. .IP "\fB\-t\fP" 10
  95. Indicate the last change to the system clock.
  96. .IP "\fB\-T\fP" 10
  97. Show the state of each terminal, as described in the STDOUT section.
  98. .IP "\fB\-u\fP" 10
  99. Write ``idle time'' for each displayed user in addition to any other
  100. information. The idle time is the time since any activity occurred on
  101. the user's terminal. The method of determining this is unspecified.
  102. This option shall list only those users who are currently logged in.
  103. The <\fIname\fP> is the user's login name. The <\fIline\fP> is the name
  104. of the line as found in the directory
  105. .BR /dev .
  106. The <\fItime\fP> is the time that the user logged in. The
  107. <\fIactivity\fP> is the number of hours and minutes since activity last
  108. occurred on that particular line. A dot indicates that the terminal has
  109. seen activity in the last minute and is therefore ``current''. If more
  110. than twenty-four hours have elapsed or the line has not been used since
  111. boot time, the entry shall be marked <\fIold\fP>. This field is useful
  112. when trying to determine whether a person is working at the terminal or
  113. not. The <\fIpid\fP> is the process ID of the user's login process.
  114. .SH OPERANDS
  115. The following operands shall be supported:
  116. .IP "\fBam\ i\fR,\ \fBam\ I\fR" 10
  117. In the POSIX locale, limit the output to describing the invoking user,
  118. equivalent to the
  119. .BR \-m
  120. option. The
  121. .BR am
  122. and
  123. .BR i
  124. or
  125. .BR I
  126. must be separate arguments.
  127. .IP "\fIfile\fR" 10
  128. Specify a pathname of a file to substitute for the
  129. implementation-defined database of logged-on users that
  130. .IR who
  131. uses by default.
  132. .SH STDIN
  133. Not used.
  134. .SH "INPUT FILES"
  135. None.
  136. .SH "ENVIRONMENT VARIABLES"
  137. The following environment variables shall affect the execution of
  138. .IR who :
  139. .IP "\fILANG\fP" 10
  140. Provide a default value for the internationalization variables that are
  141. unset or null. (See the Base Definitions volume of POSIX.1\(hy2017,
  142. .IR "Section 8.2" ", " "Internationalization Variables"
  143. for the precedence of internationalization variables used to determine
  144. the values of locale categories.)
  145. .IP "\fILC_ALL\fP" 10
  146. If set to a non-empty string value, override the values of all the
  147. other internationalization variables.
  148. .IP "\fILC_CTYPE\fP" 10
  149. Determine the locale for the interpretation of sequences of bytes of
  150. text data as characters (for example, single-byte as opposed to
  151. multi-byte characters in arguments).
  152. .IP "\fILC_MESSAGES\fP" 10
  153. .br
  154. Determine the locale that should be used to affect the format and
  155. contents of diagnostic messages written to standard error.
  156. .IP "\fILC_TIME\fP" 10
  157. Determine the locale used for the format and contents of the date and
  158. time strings.
  159. .IP "\fINLSPATH\fP" 10
  160. Determine the location of message catalogs for the processing of
  161. .IR LC_MESSAGES .
  162. .IP "\fITZ\fP" 10
  163. Determine the timezone used when writing date and time information. If
  164. .IR TZ
  165. is unset or null, an unspecified default timezone shall be used.
  166. .SH "ASYNCHRONOUS EVENTS"
  167. Default.
  168. .SH STDOUT
  169. The
  170. .IR who
  171. utility shall write its default format to the standard output in an
  172. implementation-defined format, subject only to the requirement of
  173. containing the information described above.
  174. .P
  175. XSI-conformant systems shall write the default information to the
  176. standard output in the following general format:
  177. .sp
  178. .RS 4
  179. .nf
  180. <\fIname\fR>\fB[\fR<\fIstate\fR>\fB]\fR<\fIline\fR><\fItime\fR>\fB[\fR<\fIactivity\fR>\fB][\fR<\fIpid\fR>\fB][\fR<\fIcomment\fR>\fB][\fR<\fIexit\fR>\fB]\fR
  181. .fi
  182. .P
  183. .RE
  184. .P
  185. For the
  186. .BR \-b
  187. option, <\fIline\fP> shall be
  188. .BR \(dqsystem boot\(dq .
  189. The <\fIname\fP> is unspecified.
  190. .P
  191. The following format shall be used for the
  192. .BR \-T
  193. option:
  194. .sp
  195. .RS 4
  196. .nf
  197. "%s %c %s %s\en" <\fIname\fR>, <\fIterminal state\fR>, <\fIterminal name\fR>,
  198. <\fItime of login\fR>
  199. .fi
  200. .P
  201. .RE
  202. .P
  203. where <\fIterminal\ state\fP> is one of the following characters:
  204. .IP "\fR+\fR" 8
  205. The terminal allows write access to other users.
  206. .IP "\fR\-\fR" 8
  207. The terminal denies write access to other users.
  208. .IP "\fR?\fR" 8
  209. The terminal write-access state cannot be determined.
  210. .IP "\fR<space>\fR" 8
  211. This entry is not associated with a terminal.
  212. .P
  213. In the POSIX locale, the <\fItime\ of\ login\fP> shall be equivalent in
  214. format to the output of:
  215. .sp
  216. .RS 4
  217. .nf
  218. date +"%b %e %H:%M"
  219. .fi
  220. .P
  221. .RE
  222. .P
  223. If the
  224. .BR \-u
  225. option is used with
  226. .BR \-T ,
  227. the idle time shall be added to the end of the previous format in an
  228. unspecified format.
  229. .SH STDERR
  230. The standard error shall be used only for diagnostic messages.
  231. .SH "OUTPUT FILES"
  232. None.
  233. .SH "EXTENDED DESCRIPTION"
  234. None.
  235. .SH "EXIT STATUS"
  236. The following exit values shall be returned:
  237. .IP "\00" 6
  238. Successful completion.
  239. .IP >0 6
  240. An error occurred.
  241. .SH "CONSEQUENCES OF ERRORS"
  242. Default.
  243. .LP
  244. .IR "The following sections are informative."
  245. .SH "APPLICATION USAGE"
  246. The name
  247. .IR init
  248. used for the system process is the most commonly used on historical
  249. systems, but it may vary.
  250. .P
  251. The ``domain of accessibility'' referred to is a broad concept that
  252. permits interpretation either on a very secure basis or even to allow a
  253. network-wide implementation like the historical
  254. .IR rwho .
  255. .SH EXAMPLES
  256. None.
  257. .SH RATIONALE
  258. Due to differences between historical implementations, the base options
  259. provided were a compromise to allow users to work with those
  260. functions. The standard developers also considered removing all the
  261. options, but felt that these options offered users valuable
  262. functionality. Additional options to match historical systems are
  263. available on XSI-conformant systems.
  264. .P
  265. It is recognized that the
  266. .IR who
  267. command may be of limited usefulness, especially in a multi-level
  268. secure environment. The standard developers considered, however, that
  269. having some standard method of determining the ``accessibility'' of
  270. other users would aid user portability.
  271. .P
  272. No format was specified for the default
  273. .IR who
  274. output for systems not supporting the XSI option. In such a
  275. user-oriented command, designed only for human use, this was not
  276. considered to be a deficiency.
  277. .P
  278. The format of the terminal name is unspecified, but the descriptions of
  279. .IR ps ,
  280. .IR talk ,
  281. and
  282. .IR write
  283. require that they use the same format.
  284. .P
  285. It is acceptable for an implementation to produce no output for
  286. an invocation of
  287. .IR who
  288. .BR mil .
  289. .SH "FUTURE DIRECTIONS"
  290. None.
  291. .SH "SEE ALSO"
  292. .IR "\fImesg\fR\^"
  293. .P
  294. The Base Definitions volume of POSIX.1\(hy2017,
  295. .IR "Chapter 8" ", " "Environment Variables",
  296. .IR "Section 12.2" ", " "Utility Syntax Guidelines"
  297. .\"
  298. .SH COPYRIGHT
  299. Portions of this text are reprinted and reproduced in electronic form
  300. from IEEE Std 1003.1-2017, Standard for Information Technology
  301. -- Portable Operating System Interface (POSIX), The Open Group Base
  302. Specifications Issue 7, 2018 Edition,
  303. Copyright (C) 2018 by the Institute of
  304. Electrical and Electronics Engineers, Inc and The Open Group.
  305. In the event of any discrepancy between this version and the original IEEE and
  306. The Open Group Standard, the original IEEE and The Open Group Standard
  307. is the referee document. The original Standard can be obtained online at
  308. http://www.opengroup.org/unix/online.html .
  309. .PP
  310. Any typographical or formatting errors that appear
  311. in this page are most likely
  312. to have been introduced during the conversion of the source files to
  313. man page format. To report such errors, see
  314. https://www.kernel.org/doc/man-pages/reporting_bugs.html .