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

logname.1p (3932B)


  1. '\" et
  2. .TH LOGNAME "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. logname
  12. \(em return the user's login name
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. logname
  17. .fi
  18. .SH DESCRIPTION
  19. The
  20. .IR logname
  21. utility shall write the user's login name to standard output. The
  22. login name shall be the string that would be returned by the
  23. \fIgetlogin\fR()
  24. function defined in the System Interfaces volume of POSIX.1\(hy2017. Under the conditions where the
  25. \fIgetlogin\fR()
  26. function would fail, the
  27. .IR logname
  28. utility shall write a diagnostic message to standard error and exit
  29. with a non-zero exit status.
  30. .SH OPTIONS
  31. None.
  32. .SH OPERANDS
  33. None.
  34. .SH STDIN
  35. Not used.
  36. .SH "INPUT FILES"
  37. None.
  38. .SH "ENVIRONMENT VARIABLES"
  39. The following environment variables shall affect the execution of
  40. .IR logname :
  41. .IP "\fILANG\fP" 10
  42. Provide a default value for the internationalization variables that are
  43. unset or null. (See the Base Definitions volume of POSIX.1\(hy2017,
  44. .IR "Section 8.2" ", " "Internationalization Variables"
  45. for the precedence of internationalization variables used to determine
  46. the values of locale categories.)
  47. .IP "\fILC_ALL\fP" 10
  48. If set to a non-empty string value, override the values of all the
  49. other internationalization variables.
  50. .IP "\fILC_CTYPE\fP" 10
  51. Determine the locale for the interpretation of sequences of bytes of
  52. text data as characters (for example, single-byte as opposed to
  53. multi-byte characters in arguments).
  54. .IP "\fILC_MESSAGES\fP" 10
  55. .br
  56. Determine the locale that should be used to affect the format and
  57. contents of diagnostic messages written to standard error.
  58. .IP "\fINLSPATH\fP" 10
  59. Determine the location of message catalogs for the processing of
  60. .IR LC_MESSAGES .
  61. .SH "ASYNCHRONOUS EVENTS"
  62. Default.
  63. .SH STDOUT
  64. The
  65. .IR logname
  66. utility output shall be a single line consisting of the user's login
  67. name:
  68. .sp
  69. .RS 4
  70. .nf
  71. "%s\en", <\fIlogin name\fR>
  72. .fi
  73. .P
  74. .RE
  75. .SH STDERR
  76. The standard error shall be used only for diagnostic messages.
  77. .SH "OUTPUT FILES"
  78. None.
  79. .SH "EXTENDED DESCRIPTION"
  80. None.
  81. .SH "EXIT STATUS"
  82. The following exit values shall be returned:
  83. .IP "\00" 6
  84. Successful completion.
  85. .IP >0 6
  86. An error occurred.
  87. .SH "CONSEQUENCES OF ERRORS"
  88. Default.
  89. .LP
  90. .IR "The following sections are informative."
  91. .SH "APPLICATION USAGE"
  92. The
  93. .IR logname
  94. utility explicitly ignores the
  95. .IR LOGNAME
  96. environment variable because environment changes could produce
  97. erroneous results.
  98. .SH EXAMPLES
  99. None.
  100. .SH RATIONALE
  101. The
  102. .BR passwd
  103. file is not listed as required because the implementation may have
  104. other means of mapping login names.
  105. .SH "FUTURE DIRECTIONS"
  106. None.
  107. .SH "SEE ALSO"
  108. .IR "\fIid\fR\^",
  109. .IR "\fIwho\fR\^"
  110. .P
  111. The Base Definitions volume of POSIX.1\(hy2017,
  112. .IR "Chapter 8" ", " "Environment Variables"
  113. .P
  114. The System Interfaces volume of POSIX.1\(hy2017,
  115. .IR "\fIgetlogin\fR\^(\|)"
  116. .\"
  117. .SH COPYRIGHT
  118. Portions of this text are reprinted and reproduced in electronic form
  119. from IEEE Std 1003.1-2017, Standard for Information Technology
  120. -- Portable Operating System Interface (POSIX), The Open Group Base
  121. Specifications Issue 7, 2018 Edition,
  122. Copyright (C) 2018 by the Institute of
  123. Electrical and Electronics Engineers, Inc and The Open Group.
  124. In the event of any discrepancy between this version and the original IEEE and
  125. The Open Group Standard, the original IEEE and The Open Group Standard
  126. is the referee document. The original Standard can be obtained online at
  127. http://www.opengroup.org/unix/online.html .
  128. .PP
  129. Any typographical or formatting errors that appear
  130. in this page are most likely
  131. to have been introduced during the conversion of the source files to
  132. man page format. To report such errors, see
  133. https://www.kernel.org/doc/man-pages/reporting_bugs.html .