FUSER(P) | POSIX Programmer's Manual | FUSER(P) |
fuser - list process IDs of all processes that have one or more files open
fuser [ -cfu ] file ...
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.
A user may need appropriate privilege to invoke the fuser utility.
The fuser utility shall conform to the Base Definitions volume of IEEE Std 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
The following options shall be supported:
The following operand shall be supported:
Not used.
The user database.
The following environment variables shall affect the execution of fuser:
Default.
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>
The fuser utility shall write diagnostic messages to standard error.
The fuser utility also shall write the following to standard error:
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.
None.
None.
The following exit values shall be returned:
Default.
The following sections are informative.
None.
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.
The definition of the fuser utility follows existing practice.
None.
None.
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 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 .
2003 | IEEE/The Open Group |