1FUSER(1P)                  POSIX Programmer's Manual                 FUSER(1P)
2
3
4

PROLOG

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

NAME

12       fuser - list process IDs of all processes that have one or  more  files
13       open
14

SYNOPSIS

16       fuser [ -cfu ] file ...
17

DESCRIPTION

19       The  fuser  utility  shall  write to standard output the process IDs of
20       processes running on the local system that have one or more named files
21       open.  For  block special devices, all processes using any file on that
22       device are listed.
23
24       The fuser utility shall write to standard error additional  information
25       about the named files indicating how the file is being used.
26
27       Any  output  for  processes running on remote systems that have a named
28       file open is unspecified.
29
30       A user may need appropriate privilege to invoke the fuser utility.
31

OPTIONS

33       The fuser utility shall conform  to  the  Base  Definitions  volume  of
34       IEEE Std 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
35
36       The following options shall be supported:
37
38       -c     The  file  is  treated  as  a  mount point and the utility shall
39              report on any files open in the file system.
40
41       -f     The report shall be only for the named files.
42
43       -u     The user name, in parentheses, associated with each  process  ID
44              written to standard output shall be written to standard error.
45
46

OPERANDS

48       The following operand shall be supported:
49
50       file   A pathname on which the file or file system is to be reported.
51
52

STDIN

54       Not used.
55

INPUT FILES

57       The user database.
58

ENVIRONMENT VARIABLES

60       The  following  environment  variables  shall  affect  the execution of
61       fuser:
62
63       LANG   Provide a default value for the  internationalization  variables
64              that  are  unset  or  null.  (See the Base Definitions volume of
65              IEEE Std 1003.1-2001, Section  8.2,  Internationalization  Vari‐
66              ables  for the precedence of internationalization variables used
67              to determine the values of locale categories.)
68
69       LC_ALL If set to a non-empty string value, override the values  of  all
70              the other internationalization variables.
71
72       LC_CTYPE
73              Determine  the  locale  for  the  interpretation of sequences of
74              bytes of text data as characters (for  example,  single-byte  as
75              opposed to multi-byte characters in arguments).
76
77       LC_MESSAGES
78              Determine  the  locale  that should be used to affect the format
79              and contents of diagnostic messages written to standard error.
80
81       NLSPATH
82              Determine the location of message catalogs for the processing of
83              LC_MESSAGES .
84
85

ASYNCHRONOUS EVENTS

87       Default.
88

STDOUT

90       The  fuser  utility  shall  write the process ID for each process using
91       each file given as an operand to standard output in the following  for‐
92       mat:
93
94
95              "%d", <process_id>
96

STDERR

98       The fuser utility shall write diagnostic messages to standard error.
99
100       The fuser utility also shall write the following to standard error:
101
102        * The pathname of each named file is written followed immediately by a
103          colon.
104
105        * For each process ID written to standard output,  the  character  'c'
106          shall  be written to standard error if the process is using the file
107          as its current directory and the character 'r' shall be  written  to
108          standard  error  if the process is using the file as its root direc‐
109          tory. Implementations may write other alphabetic characters to indi‐
110          cate other uses of files.
111
112        * When  the  -u  option is specified, characters indicating the use of
113          the file shall be followed immediately by the user name,  in  paren‐
114          theses,  corresponding  to  the  process' real user ID.  If the user
115          name cannot be resolved from the process' real user ID, the process'
116          real user ID shall be written instead of the user name.
117
118       When  standard output and standard error are directed to the same file,
119       the output shall be interleaved so that the  filename  appears  at  the
120       start  of each line, followed by the process ID and characters indicat‐
121       ing the use of the file. Then, if the -u option is specified, the  user
122       name or user ID for each process using that file shall be written.
123
124       A  <newline>  shall  be written to standard error after the last output
125       described above for each file operand.
126

OUTPUT FILES

128       None.
129

EXTENDED DESCRIPTION

131       None.
132

EXIT STATUS

134       The following exit values shall be returned:
135
136        0     Successful completion.
137
138       >0     An error occurred.
139
140

CONSEQUENCES OF ERRORS

142       Default.
143
144       The following sections are informative.
145

APPLICATION USAGE

147       None.
148

EXAMPLES

150       The command:
151
152
153              fuser -fu .
154
155       writes to standard output the process IDs of processes that  are  using
156       the current directory and writes to standard error an indication of how
157       those processes are using the directory and the user  names  associated
158       with the processes that are using the current directory.
159

RATIONALE

161       The definition of the fuser utility follows existing practice.
162

FUTURE DIRECTIONS

164       None.
165

SEE ALSO

167       None.
168
170       Portions  of  this text are reprinted and reproduced in electronic form
171       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
172       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
173       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
174       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
175       event of any discrepancy between this version and the original IEEE and
176       The  Open Group Standard, the original IEEE and The Open Group Standard
177       is the referee document. The original Standard can be  obtained  online
178       at http://www.opengroup.org/unix/online.html .
179
180
181
182IEEE/The Open Group                  2003                            FUSER(1P)
Impressum