FUSER(1)                   POSIX Programmer's Manual                  FUSER(1)



PPRROOLLOOGG
       This manual page is part of the POSIX Programmer's Manual.  The OS
       implementation of this interface may differ (consult the corresponding
       OS manual page for details of OS behavior), or the interface may not be
       implemented on OS.


NNAAMMEE
       fuser -- list process IDs of all processes that have one or more files
       open

SSYYNNOOPPSSIISS
       fuser [[-cfu]] _f_i_l_e...

DDEESSCCRRIIPPTTIIOONN
       The _f_u_s_e_r 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 _f_u_s_e_r 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 privileges to invoke the _f_u_s_e_r utility.

OOPPTTIIOONNSS
       The _f_u_s_e_r utility shall conform to the Base Definitions volume of
       POSIX.1-2008, _S_e_c_t_i_o_n _1_2_._2, _U_t_i_l_i_t_y _S_y_n_t_a_x _G_u_i_d_e_l_i_n_e_s.

       The following options shall be supported:

       --cc        The file is treated as a mount point and the utility shall
                 report on any files open in the file system.

       --ff        The report shall be only for the named files.

       --uu        The user name, in parentheses, associated with each process
                 ID written to standard output shall be written to standard
                 error.

OOPPEERRAANNDDSS
       The following operand shall be supported:

       _f_i_l_e      A pathname on which the file or file system is to be
                 reported.

SSTTDDIINN
       Not used.

IINNPPUUTT FFIILLEESS
       The user database.

EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS
       The following environment variables shall affect the execution of
       _f_u_s_e_r:

       _L_A_N_G      Provide a default value for the internationalization
                 variables that are unset or null. (See the Base Definitions
                 volume of POSIX.1-2008, _S_e_c_t_i_o_n _8_._2, _I_n_t_e_r_n_a_t_i_o_n_a_l_i_z_a_t_i_o_n
                 _V_a_r_i_a_b_l_e_s for the precedence of internationalization
                 variables used to determine the values of locale categories.)

       _L_C___A_L_L    If set to a non-empty string value, override the values of
                 all the other internationalization variables.

       _L_C___C_T_Y_P_E  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).

       _L_C___M_E_S_S_A_G_E_S
                 Determine the locale that should be used to affect the format
                 and contents of diagnostic messages written to standard
                 error.

       _N_L_S_P_A_T_H   Determine the location of message catalogs for the processing
                 of _L_C___M_E_S_S_A_G_E_S.

AASSYYNNCCHHRROONNOOUUSS EEVVEENNTTSS
       Default.

SSTTDDOOUUTT
       The _f_u_s_e_r utility shall write the process ID for each process using
       each file given as an operand to standard output in the following
       format:

           ""%%dd"",, <<_p_r_o_c_e_s_s___i_d>

SSTTDDEERRRR
       The _f_u_s_e_r utility shall write diagnostic messages to standard error.

       The _f_u_s_e_r 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 ''cc''
           shall be written to standard error if the process is using the file
           as its current directory and the character ''rr'' 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 --uu option 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 --uu 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 _f_i_l_e operand.

OOUUTTPPUUTT FFIILLEESS
       None.

EEXXTTEENNDDEEDD DDEESSCCRRIIPPTTIIOONN
       None.

EEXXIITT SSTTAATTUUSS
       The following exit values shall be returned:

        0    Successful completion.

       >0    An error occurred.

CCOONNSSEEQQUUEENNCCEESS OOFF EERRRROORRSS
       Default.

       _T_h_e _f_o_l_l_o_w_i_n_g _s_e_c_t_i_o_n_s _a_r_e _i_n_f_o_r_m_a_t_i_v_e_.

AAPPPPLLIICCAATTIIOONN UUSSAAGGEE
       None.

EEXXAAMMPPLLEESS
       The command:

           ffuusseerr --ffuu ..

       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.

           ffuusseerr --cc <<_m_o_u_n_t _p_o_i_n_t>

       writes to standard output the process IDs of processes that are using
       any file in the file system which is mounted on <_m_o_u_n_t _p_o_i_n_t> and
       writes to standard error an indication of how those processes are using
       the files.

           ffuusseerr <<_m_o_u_n_t _p_o_i_n_t>

       writes to standard output the process IDs of processes that are using
       the file which is named by <_m_o_u_n_t _p_o_i_n_t> and writes to standard error
       an indication of how those processes are using the file.

           ffuusseerr <<_b_l_o_c_k _d_e_v_i_c_e>

       writes to standard output the process IDs of processes that are using
       any file which is on the device named by <_b_l_o_c_k _d_e_v_i_c_e> and writes to
       standard error an indication of how those processes are using the file.

           ffuusseerr --ff <<_b_l_o_c_k _d_e_v_i_c_e>

       writes to standard output the process IDs of processes that are using
       the file <_b_l_o_c_k _d_e_v_i_c_e> itself and writes to standard error an
       indication of how those processes are using the file.

RRAATTIIOONNAALLEE
       The definition of the _f_u_s_e_r utility follows existing practice.

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       None.

SSEEEE AALLSSOO
       The Base Definitions volume of POSIX.1-2008, _C_h_a_p_t_e_r _8, _E_n_v_i_r_o_n_m_e_n_t
       _V_a_r_i_a_b_l_e_s, _S_e_c_t_i_o_n _1_2_._2, _U_t_i_l_i_t_y _S_y_n_t_a_x _G_u_i_d_e_l_i_n_e_s

CCOOPPYYRRIIGGHHTT
       Portions of this text are reprinted and reproduced in electronic form
       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
       -- Portable Operating System Interface (POSIX), The Open Group Base
       Specifications Issue 7, Copyright (C) 2013 by the Institute of
       Electrical and Electronics Engineers, Inc and The Open Group.  (This is
       POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) 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.unix.org/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 .



IEEE/The Open Group                  2013                             FUSER(1)
