FUSER(1POSIX)
πΈ FUSER(1POSIX) β the POSIX Programmer's Manual, but make it cute πΈ
okay bestie, before we even start β this page lives in the POSIX Programmer's Manual, and I need you to know that the Linux version of this interface may be different (so go check the matching Linux manual page for the deets on Linux behavior), or honestly it might not even be implemented on Linux at all. no cap. π
β¨ PROLOG β¨
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.
π NAME π
fuser β list process IDs of all processes that have one or more files open
like literally, who's got your files open right now? fuser knows. π΅οΈβοΈ
π SYNOPSIS π
fuser [-cfu] file...
π¦ DESCRIPTION π¦
The fuser utility shall write to standard output the process IDs of processes running on the local system that have one or more named files open. For block special devices, all processes using any file on that device are listed. π
The fuser utility shall write to standard error additional information about the named files indicating how the file is being used.
Any output for processes running on remote systems that have a named file open is unspecified. (soβ¦ unspecified, bestie, we don't make promises there π)
A user may need appropriate privileges to invoke the fuser utility. π
π OPTIONS π
The fuser utility shall conform to the Base Definitions volume of POSIX.1β2017, Section 12.2, Utility Syntax Guidelines.
The following options shall be supported:
-cβ the file is treated as a mount point and the utility shall report on any files open in the file system.-fβ the report shall be only for the named files. (no extra files invited to the party β)-uβ the user name, in parentheses, associated with each process ID written to standard output shall be written to standard error. π«Ά
π OPERANDS π
The following operand shall be supported:
fileβ a pathname on which the file or file system is to be reported.
π STDIN π
Not used. (she's not taking input today, she's just observing π )
π INPUT FILES π
The user database.
π ENVIRONMENT VARIABLES π
The following environment variables shall affect the execution of fuser:
LANGβ provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume of POSIX.1β2017, Section 8.2, Internationalization Variables for the precedence of internationalization variables used to determine the values of locale categories.)LC_ALLβ if set to a non-empty string value, override the values of all the other internationalization variables.LC_CTYPEβ determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multi-byte characters in arguments).LC_MESSAGESβ determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.NLSPATHβ determine the location of message catalogs for the processing ofLC_MESSAGES.
β‘ ASYNCHRONOUS EVENTS β‘
Default.
β STDOUT β
The fuser utility shall write the process ID for each process using each file given as an operand to standard output in the following format:
"%d", <process_id>
π STDERR π
The fuser utility shall write diagnostic messages to standard error.
The fuser utility also shall write the following to standard error:
- The pathname of each named file is written followed immediately by a
<colon>. - For each process ID written to standard output, the character
'c'shall be written to standard error if the process is using the file as its current directory and the character'r'shall be written to standard error if the process is using the file as its root directory. Implementations may write other alphabetic characters to indicate other uses of files. - When the
-uoption is specified, characters indicating the use of the file shall be followed immediately by the user name, in parentheses, corresponding to the real user ID of the process. If the user name cannot be resolved from the real user ID of the process, the real user ID of the process shall be written instead of the user name.
When standard output and standard error are directed to the same file, the output shall be interleaved so that the filename appears at the start of each line, followed by the process ID and characters indicating the use of the file. Then, if the -u option is specified, the user name or user ID for each process using that file shall be written.
A <newline> shall be written to standard error after the last output described above for each file operand.
π OUTPUT FILES π
None.
π§ EXTENDED DESCRIPTION π§
None.
π₯ EXIT STATUS π₯
The following exit values shall be returned:
0β successful completion. β¨>0β an error occurred. π
πΈ CONSEQUENCES OF ERRORS πΈ
Default.
The following sections are informative.
π APPLICATION USAGE π
None.
π EXAMPLES π
The command:
fuser -fu .
writes to standard output the process IDs of processes that are using the current directory and writes to standard error an indication of how those processes are using the directory and the user names associated with the processes that are using the current directory.
fuser -c <mount point>
writes to standard output the process IDs of processes that are using any file in the file system which is mounted on <mount point> and writes to standard error an indication of how those processes are using the files.
fuser <mount point>
writes to standard output the process IDs of processes that are using the file which is named by <mount point> and writes to standard error an indication of how those processes are using the file.
fuser <block device>
writes to standard output the process IDs of processes that are using any file which is on the device named by <block device> and writes to standard error an indication of how those processes are using the file.
fuser -f <block device>
writes to standard output the process IDs of processes that are using the file <block device> itself and writes to standard error an indication of how those processes are using the file.
π RATIONALE π
The definition of the fuser utility follows existing practice. (iconic behavior, honestly β she's just doing what already worked π
)
π FUTURE DIRECTIONS π
None.
π SEE ALSO π
The Base Definitions volume of POSIX.1β2017, Chapter 8, Environment Variables, Section 12.2, Utility Syntax Guidelines
π COPYRIGHT π
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version 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 .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
and that's the whole page, bestie π«Ά this one came to you from IEEE/The Open Group, dated 2017, and it's the FUSER(1POSIX) page β stan a standard that knows which process is hogging your mount point. periodt. πβ¨
π¦ where this page comes from
- debian bookworm: manpages-posix 2017a-2 Β· Other
- debian trixie: manpages-posix 2017a-2 Β· Other
- ubuntu jammy: manpages-posix 2017a-2 Β· Other
- ubuntu noble: manpages-posix 2017a-2 Β· Other
- ubuntu resolute: manpages-posix 2017a-2build1 Β· Other
- ubuntu stonking: manpages-posix 2017a-2.1 Β· Other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms