Blame man-pages-posix-2013-a/man1p/fuser.1p

Packit 7cfc04
'\" et
Packit 7cfc04
.TH FUSER "1P" 2013 "IEEE/The Open Group" "POSIX Programmer's Manual"
Packit 7cfc04
.SH PROLOG
Packit 7cfc04
This manual page is part of the POSIX Programmer's Manual.
Packit 7cfc04
The Linux implementation of this interface may differ (consult
Packit 7cfc04
the corresponding Linux manual page for details of Linux behavior),
Packit 7cfc04
or the interface may not be implemented on Linux.
Packit 7cfc04
Packit 7cfc04
.SH NAME
Packit 7cfc04
fuser
Packit 7cfc04
\(em list process IDs of all processes that have one or more files open
Packit 7cfc04
.SH SYNOPSIS
Packit 7cfc04
.LP
Packit 7cfc04
.nf
Packit 7cfc04
fuser \fB[\fR\(micfu\fB] \fIfile\fR...
Packit 7cfc04
.fi
Packit 7cfc04
.SH DESCRIPTION
Packit 7cfc04
The
Packit 7cfc04
.IR fuser
Packit 7cfc04
utility shall write to standard output the process IDs of processes
Packit 7cfc04
running on the local system that have one or more named files open.
Packit 7cfc04
For block special devices, all processes using any file on that device
Packit 7cfc04
are listed.
Packit 7cfc04
.P
Packit 7cfc04
The
Packit 7cfc04
.IR fuser
Packit 7cfc04
utility shall write to standard error additional information about the
Packit 7cfc04
named files indicating how the file is being used.
Packit 7cfc04
.P
Packit 7cfc04
Any output for processes running on remote systems that have a named
Packit 7cfc04
file open is unspecified.
Packit 7cfc04
.P
Packit 7cfc04
A user may need appropriate privileges to invoke the
Packit 7cfc04
.IR fuser
Packit 7cfc04
utility.
Packit 7cfc04
.SH OPTIONS
Packit 7cfc04
The
Packit 7cfc04
.IR fuser
Packit 7cfc04
utility shall conform to the Base Definitions volume of POSIX.1\(hy2008,
Packit 7cfc04
.IR "Section 12.2" ", " "Utility Syntax Guidelines".
Packit 7cfc04
.P
Packit 7cfc04
The following options shall be supported:
Packit 7cfc04
.IP "\fB\(mic\fR" 10
Packit 7cfc04
The file is treated as a mount point and the utility shall report
Packit 7cfc04
on any files open in the file system.
Packit 7cfc04
.IP "\fB\(mif\fR" 10
Packit 7cfc04
The report shall be only for the named files.
Packit 7cfc04
.IP "\fB\(miu\fR" 10
Packit 7cfc04
The user name, in parentheses, associated with each process ID written
Packit 7cfc04
to standard output shall be written to standard error.
Packit 7cfc04
.SH OPERANDS
Packit 7cfc04
The following operand shall be supported:
Packit 7cfc04
.IP "\fIfile\fP" 10
Packit 7cfc04
A pathname on which the file or file system is to be reported.
Packit 7cfc04
.SH STDIN
Packit 7cfc04
Not used.
Packit 7cfc04
.SH "INPUT FILES"
Packit 7cfc04
The user database.
Packit 7cfc04
.SH "ENVIRONMENT VARIABLES"
Packit 7cfc04
The following environment variables shall affect the execution of
Packit 7cfc04
.IR fuser :
Packit 7cfc04
.IP "\fILANG\fP" 10
Packit 7cfc04
Provide a default value for the internationalization variables that are
Packit 7cfc04
unset or null. (See the Base Definitions volume of POSIX.1\(hy2008,
Packit 7cfc04
.IR "Section 8.2" ", " "Internationalization Variables"
Packit 7cfc04
for the precedence of internationalization variables used to determine
Packit 7cfc04
the values of locale categories.)
Packit 7cfc04
.IP "\fILC_ALL\fP" 10
Packit 7cfc04
If set to a non-empty string value, override the values of all the
Packit 7cfc04
other internationalization variables.
Packit 7cfc04
.IP "\fILC_CTYPE\fP" 10
Packit 7cfc04
Determine the locale for the interpretation of sequences of bytes of
Packit 7cfc04
text data as characters (for example, single-byte as opposed to
Packit 7cfc04
multi-byte characters in arguments).
Packit 7cfc04
.IP "\fILC_MESSAGES\fP" 10
Packit 7cfc04
.br
Packit 7cfc04
Determine the locale that should be used to affect the format and
Packit 7cfc04
contents of diagnostic messages written to standard error.
Packit 7cfc04
.IP "\fINLSPATH\fP" 10
Packit 7cfc04
Determine the location of message catalogs for the processing of
Packit 7cfc04
.IR LC_MESSAGES .
Packit 7cfc04
.SH "ASYNCHRONOUS EVENTS"
Packit 7cfc04
Default.
Packit 7cfc04
.SH STDOUT
Packit 7cfc04
The
Packit 7cfc04
.IR fuser
Packit 7cfc04
utility shall write the process ID for each process using each file
Packit 7cfc04
given as an operand to standard output in the following format:
Packit 7cfc04
.sp
Packit 7cfc04
.RS 4
Packit 7cfc04
.nf
Packit 7cfc04
\fB
Packit 7cfc04
"%d", <\fIprocess_id\fR>
Packit 7cfc04
.fi \fR
Packit 7cfc04
.P
Packit 7cfc04
.RE
Packit 7cfc04
.SH STDERR
Packit 7cfc04
The
Packit 7cfc04
.IR fuser
Packit 7cfc04
utility shall write diagnostic messages to standard error.
Packit 7cfc04
.P
Packit 7cfc04
The
Packit 7cfc04
.IR fuser
Packit 7cfc04
utility also shall write the following to standard error:
Packit 7cfc04
.IP " *" 4
Packit 7cfc04
The pathname of each named file is written followed immediately by a
Packit 7cfc04
<colon>.
Packit 7cfc04
.IP " *" 4
Packit 7cfc04
For each process ID written to standard output, the character
Packit 7cfc04
.BR 'c' 
Packit 7cfc04
shall be written to standard error if the process is using the file as
Packit 7cfc04
its current directory and the character
Packit 7cfc04
.BR 'r' 
Packit 7cfc04
shall be written to standard error if the process is using the file as
Packit 7cfc04
its root directory. Implementations may write other alphabetic
Packit 7cfc04
characters to indicate other uses of files.
Packit 7cfc04
.IP " *" 4
Packit 7cfc04
When the
Packit 7cfc04
.BR \(miu
Packit 7cfc04
option is specified, characters indicating the use of the file shall be
Packit 7cfc04
followed immediately by the user name, in parentheses, corresponding to
Packit 7cfc04
the real user ID of the process. If the user name cannot be resolved from
Packit 7cfc04
the real user ID of the process, the real user ID of the process shall
Packit 7cfc04
be written instead of the user name.
Packit 7cfc04
.P
Packit 7cfc04
When standard output and standard error are directed to the same file,
Packit 7cfc04
the output shall be interleaved so that the filename appears at the
Packit 7cfc04
start of each line, followed by the process ID and characters
Packit 7cfc04
indicating the use of the file. Then, if the
Packit 7cfc04
.BR \(miu
Packit 7cfc04
option is specified, the user name or user ID for each process using
Packit 7cfc04
that file shall be written.
Packit 7cfc04
.P
Packit 7cfc04
A
Packit 7cfc04
<newline>
Packit 7cfc04
shall be written to standard error after the last output
Packit 7cfc04
described above for each
Packit 7cfc04
.IR file
Packit 7cfc04
operand.
Packit 7cfc04
.SH "OUTPUT FILES"
Packit 7cfc04
None.
Packit 7cfc04
.SH "EXTENDED DESCRIPTION"
Packit 7cfc04
None.
Packit 7cfc04
.SH "EXIT STATUS"
Packit 7cfc04
The following exit values shall be returned:
Packit 7cfc04
.IP "\00" 6
Packit 7cfc04
Successful completion.
Packit 7cfc04
.IP >0 6
Packit 7cfc04
An error occurred.
Packit 7cfc04
.SH "CONSEQUENCES OF ERRORS"
Packit 7cfc04
Default.
Packit 7cfc04
.LP
Packit 7cfc04
.IR "The following sections are informative."
Packit 7cfc04
.SH "APPLICATION USAGE"
Packit 7cfc04
None.
Packit 7cfc04
.SH EXAMPLES
Packit 7cfc04
The command:
Packit 7cfc04
.sp
Packit 7cfc04
.RS 4
Packit 7cfc04
.nf
Packit 7cfc04
\fB
Packit 7cfc04
fuser \(mifu .
Packit 7cfc04
.fi \fR
Packit 7cfc04
.P
Packit 7cfc04
.RE
Packit 7cfc04
.P
Packit 7cfc04
writes to standard output the process IDs of processes that are using
Packit 7cfc04
the current directory and writes to standard error an indication of how
Packit 7cfc04
those processes are using the directory and the user names associated
Packit 7cfc04
with the processes that are using the current directory.
Packit 7cfc04
.sp
Packit 7cfc04
.RS 4
Packit 7cfc04
.nf
Packit 7cfc04
\fB
Packit 7cfc04
fuser \(mic <\fImount point\fR>
Packit 7cfc04
.fi \fR
Packit 7cfc04
.P
Packit 7cfc04
.RE
Packit 7cfc04
.P
Packit 7cfc04
writes to standard output the process IDs of processes that are using
Packit 7cfc04
any file in the file system which is mounted on <\fImount point\fR>
Packit 7cfc04
and writes to standard error an indication of how those processes are
Packit 7cfc04
using the files.
Packit 7cfc04
.sp
Packit 7cfc04
.RS 4
Packit 7cfc04
.nf
Packit 7cfc04
\fB
Packit 7cfc04
fuser <\fImount point\fR>
Packit 7cfc04
.fi \fR
Packit 7cfc04
.P
Packit 7cfc04
.RE
Packit 7cfc04
.P
Packit 7cfc04
writes to standard output the process IDs of processes that are using
Packit 7cfc04
the file which is named by <\fImount point\fR> and writes to standard
Packit 7cfc04
error an indication of how those processes are using the file.
Packit 7cfc04
.sp
Packit 7cfc04
.RS 4
Packit 7cfc04
.nf
Packit 7cfc04
\fB
Packit 7cfc04
fuser <\fIblock device\fR>
Packit 7cfc04
.fi \fR
Packit 7cfc04
.P
Packit 7cfc04
.RE
Packit 7cfc04
.P
Packit 7cfc04
writes to standard output the process IDs of processes that are using
Packit 7cfc04
any file which is on the device named by <\fIblock device\fR> and
Packit 7cfc04
writes to standard error an indication of how those processes are using
Packit 7cfc04
the file.
Packit 7cfc04
.sp
Packit 7cfc04
.RS 4
Packit 7cfc04
.nf
Packit 7cfc04
\fB
Packit 7cfc04
fuser \(mif <\fIblock device\fR>
Packit 7cfc04
.fi \fR
Packit 7cfc04
.P
Packit 7cfc04
.RE
Packit 7cfc04
.P
Packit 7cfc04
writes to standard output the process IDs of processes that are using
Packit 7cfc04
the file <\fIblock device\fR> itself and writes to standard error an
Packit 7cfc04
indication of how those processes are using the file.
Packit 7cfc04
.SH RATIONALE
Packit 7cfc04
The definition of the
Packit 7cfc04
.IR fuser
Packit 7cfc04
utility follows existing practice.
Packit 7cfc04
.SH "FUTURE DIRECTIONS"
Packit 7cfc04
None.
Packit 7cfc04
.SH "SEE ALSO"
Packit 7cfc04
The Base Definitions volume of POSIX.1\(hy2008,
Packit 7cfc04
.IR "Chapter 8" ", " "Environment Variables",
Packit 7cfc04
.IR "Section 12.2" ", " "Utility Syntax Guidelines"
Packit 7cfc04
.SH COPYRIGHT
Packit 7cfc04
Portions of this text are reprinted and reproduced in electronic form
Packit 7cfc04
from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
Packit 7cfc04
-- Portable Operating System Interface (POSIX), The Open Group Base
Packit 7cfc04
Specifications Issue 7, Copyright (C) 2013 by the Institute of
Packit 7cfc04
Electrical and Electronics Engineers, Inc and The Open Group.
Packit 7cfc04
(This is POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
Packit 7cfc04
event of any discrepancy between this version and the original IEEE and
Packit 7cfc04
The Open Group Standard, the original IEEE and The Open Group Standard
Packit 7cfc04
is the referee document. The original Standard can be obtained online at
Packit 7cfc04
http://www.unix.org/online.html .
Packit 7cfc04
Packit 7cfc04
Any typographical or formatting errors that appear
Packit 7cfc04
in this page are most likely
Packit 7cfc04
to have been introduced during the conversion of the source files to
Packit 7cfc04
man page format. To report such errors, see
Packit 7cfc04
https://www.kernel.org/doc/man-pages/reporting_bugs.html .