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

fuser.1p (7332B)


  1. '\" et
  2. .TH FUSER "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. fuser
  12. \(em list process IDs of all processes that have one or more files open
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. fuser \fB[\fR-cfu\fB] \fIfile\fR...
  17. .fi
  18. .SH DESCRIPTION
  19. The
  20. .IR fuser
  21. utility shall write to standard output the process IDs of processes
  22. running on the local system that have one or more named files open.
  23. For block special devices, all processes using any file on that device
  24. are listed.
  25. .P
  26. The
  27. .IR fuser
  28. utility shall write to standard error additional information about the
  29. named files indicating how the file is being used.
  30. .P
  31. Any output for processes running on remote systems that have a named
  32. file open is unspecified.
  33. .P
  34. A user may need appropriate privileges to invoke the
  35. .IR fuser
  36. utility.
  37. .SH OPTIONS
  38. The
  39. .IR fuser
  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:
  44. .IP "\fB\-c\fR" 10
  45. The file is treated as a mount point and the utility shall report
  46. on any files open in the file system.
  47. .IP "\fB\-f\fR" 10
  48. The report shall be only for the named files.
  49. .IP "\fB\-u\fR" 10
  50. The user name, in parentheses, associated with each process ID written
  51. to standard output shall be written to standard error.
  52. .SH OPERANDS
  53. The following operand shall be supported:
  54. .IP "\fIfile\fP" 10
  55. A pathname on which the file or file system is to be reported.
  56. .SH STDIN
  57. Not used.
  58. .SH "INPUT FILES"
  59. The user database.
  60. .SH "ENVIRONMENT VARIABLES"
  61. The following environment variables shall affect the execution of
  62. .IR fuser :
  63. .IP "\fILANG\fP" 10
  64. Provide a default value for the internationalization variables that are
  65. unset or null. (See the Base Definitions volume of POSIX.1\(hy2017,
  66. .IR "Section 8.2" ", " "Internationalization Variables"
  67. for the precedence of internationalization variables used to determine
  68. the values of locale categories.)
  69. .IP "\fILC_ALL\fP" 10
  70. If set to a non-empty string value, override the values of all the
  71. other internationalization variables.
  72. .IP "\fILC_CTYPE\fP" 10
  73. Determine the locale for the interpretation of sequences of bytes of
  74. text data as characters (for example, single-byte as opposed to
  75. multi-byte characters in arguments).
  76. .IP "\fILC_MESSAGES\fP" 10
  77. .br
  78. Determine the locale that should be used to affect the format and
  79. contents of diagnostic messages written to standard error.
  80. .IP "\fINLSPATH\fP" 10
  81. Determine the location of message catalogs for the processing of
  82. .IR LC_MESSAGES .
  83. .SH "ASYNCHRONOUS EVENTS"
  84. Default.
  85. .SH STDOUT
  86. The
  87. .IR fuser
  88. utility shall write the process ID for each process using each file
  89. given as an operand to standard output in the following format:
  90. .sp
  91. .RS 4
  92. .nf
  93. "%d", <\fIprocess_id\fR>
  94. .fi
  95. .P
  96. .RE
  97. .SH STDERR
  98. The
  99. .IR fuser
  100. utility shall write diagnostic messages to standard error.
  101. .P
  102. The
  103. .IR fuser
  104. utility also shall write the following to standard error:
  105. .IP " *" 4
  106. The pathname of each named file is written followed immediately by a
  107. <colon>.
  108. .IP " *" 4
  109. For each process ID written to standard output, the character
  110. .BR 'c'
  111. shall be written to standard error if the process is using the file as
  112. its current directory and the character
  113. .BR 'r'
  114. shall be written to standard error if the process is using the file as
  115. its root directory. Implementations may write other alphabetic
  116. characters to indicate other uses of files.
  117. .IP " *" 4
  118. When the
  119. .BR \-u
  120. option is specified, characters indicating the use of the file shall be
  121. followed immediately by the user name, in parentheses, corresponding to
  122. the real user ID of the process. If the user name cannot be resolved from
  123. the real user ID of the process, the real user ID of the process shall
  124. be written instead of the user name.
  125. .P
  126. When standard output and standard error are directed to the same file,
  127. the output shall be interleaved so that the filename appears at the
  128. start of each line, followed by the process ID and characters
  129. indicating the use of the file. Then, if the
  130. .BR \-u
  131. option is specified, the user name or user ID for each process using
  132. that file shall be written.
  133. .P
  134. A
  135. <newline>
  136. shall be written to standard error after the last output
  137. described above for each
  138. .IR file
  139. operand.
  140. .SH "OUTPUT FILES"
  141. None.
  142. .SH "EXTENDED DESCRIPTION"
  143. None.
  144. .SH "EXIT STATUS"
  145. The following exit values shall be returned:
  146. .IP "\00" 6
  147. Successful completion.
  148. .IP >0 6
  149. An error occurred.
  150. .SH "CONSEQUENCES OF ERRORS"
  151. Default.
  152. .LP
  153. .IR "The following sections are informative."
  154. .SH "APPLICATION USAGE"
  155. None.
  156. .SH EXAMPLES
  157. The command:
  158. .sp
  159. .RS 4
  160. .nf
  161. fuser -fu .
  162. .fi
  163. .P
  164. .RE
  165. .P
  166. writes to standard output the process IDs of processes that are using
  167. the current directory and writes to standard error an indication of how
  168. those processes are using the directory and the user names associated
  169. with the processes that are using the current directory.
  170. .sp
  171. .RS 4
  172. .nf
  173. fuser -c <\fImount point\fR>
  174. .fi
  175. .P
  176. .RE
  177. .P
  178. writes to standard output the process IDs of processes that are using
  179. any file in the file system which is mounted on <\fImount point\fR>
  180. and writes to standard error an indication of how those processes are
  181. using the files.
  182. .sp
  183. .RS 4
  184. .nf
  185. fuser <\fImount point\fR>
  186. .fi
  187. .P
  188. .RE
  189. .P
  190. writes to standard output the process IDs of processes that are using
  191. the file which is named by <\fImount point\fR> and writes to standard
  192. error an indication of how those processes are using the file.
  193. .sp
  194. .RS 4
  195. .nf
  196. fuser <\fIblock device\fR>
  197. .fi
  198. .P
  199. .RE
  200. .P
  201. writes to standard output the process IDs of processes that are using
  202. any file which is on the device named by <\fIblock device\fR> and
  203. writes to standard error an indication of how those processes are using
  204. the file.
  205. .sp
  206. .RS 4
  207. .nf
  208. fuser -f <\fIblock device\fR>
  209. .fi
  210. .P
  211. .RE
  212. .P
  213. writes to standard output the process IDs of processes that are using
  214. the file <\fIblock device\fR> itself and writes to standard error an
  215. indication of how those processes are using the file.
  216. .SH RATIONALE
  217. The definition of the
  218. .IR fuser
  219. utility follows existing practice.
  220. .SH "FUTURE DIRECTIONS"
  221. None.
  222. .SH "SEE ALSO"
  223. The Base Definitions volume of POSIX.1\(hy2017,
  224. .IR "Chapter 8" ", " "Environment Variables",
  225. .IR "Section 12.2" ", " "Utility Syntax Guidelines"
  226. .\"
  227. .SH COPYRIGHT
  228. Portions of this text are reprinted and reproduced in electronic form
  229. from IEEE Std 1003.1-2017, Standard for Information Technology
  230. -- Portable Operating System Interface (POSIX), The Open Group Base
  231. Specifications Issue 7, 2018 Edition,
  232. Copyright (C) 2018 by the Institute of
  233. Electrical and Electronics Engineers, Inc and The Open Group.
  234. In the event of any discrepancy between this version and the original IEEE and
  235. The Open Group Standard, the original IEEE and The Open Group Standard
  236. is the referee document. The original Standard can be obtained online at
  237. http://www.opengroup.org/unix/online.html .
  238. .PP
  239. Any typographical or formatting errors that appear
  240. in this page are most likely
  241. to have been introduced during the conversion of the source files to
  242. man page format. To report such errors, see
  243. https://www.kernel.org/doc/man-pages/reporting_bugs.html .