Penguin
Annotated edit history of fuser(1) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 FUSER
2 !!!FUSER
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 OPTIONS
7 FILES
8 EXAMPLES
9 RESTRICTIONS
10 AUTHOR
11 SEE ALSO
12 ----
13 !!NAME
14
15
16 fuser - identify processes using files or sockets
17 !!SYNOPSIS
18
19
20 __fuser__ [[__-a__|__-s__] [[__-4__|__-6__]
21 [[__-n__ ''space''] [[__-__''signal'']
22 [[__-kimuv__] ''name ...''__
23 fuser__ -l__
24 fuser__ -V
25 !!DESCRIPTION
26
27
28 __fuser__ displays the PIDs of processes using the
29 specified files or file systems. In the default display
30 mode, each file name is followed by a letter denoting the
31 type of access:
32
33
34 __c__
35
36
37 current directory.
38
39
40 __e__
41
42
43 executable being run.
44
45
46 __f__
47
48
49 open file. __f__ is omitted in default display
50 mode.
51
52
53 __r__
54
55
56 root directory.
57
58
59 __m__
60
61
62 mmap'ed file or shared library.
63
64
65 __fuser__ returns a non-zero return code if none of the
66 specified files is accessed or in case of a fatal error. If
67 at least one access has been found, __fuser__ returns
68 zero.
69
70
71 In order to look up processes using TCP and UDP sockets, the
72 corresponding name space has to be selected with the
73 __-n__ option. By default __fuser__ will look in both
74 IPv6 and IPv4 sockets. To change the default, behavour, use
75 the __-4__ and __-6 options. The socket(s) can be
76 specified by the local and remote port, and the remote
77 address. All fields are optional, but commas in front of
78 missing fields must be present:__
79
80
81 __[[__''lcl_port''__][[__,__[[__''rmt_host''__][[__,__[[__''rmt_port''__]]]__
82
83
84 Either symbolic or numeric values can be used for IP
85 addresses and port numbers.
86 !!OPTIONS
87
88
89 __-a__
90
91
92 Show all files specified on the command line. By default,
93 only files that are accessed by at least one process are
94 shown.
95
96
97 __-k__
98
99
100 Kill processes accessing the file. Unless changed with
101 __-__''signal'', SIGKILL is sent. An __fuser__
102 process never kills itself, but may kill other __fuser__
103 processes. The effective user ID of the process executing
104 __fuser__ is set to its real user ID before attempting to
105 kill.
106
107
108 __-i__
109
110
111 Ask the user for confirmation before killing a process. This
112 option is silently ignored if __-k__ is not present
113 too.
114
115
116 __-l__
117
118
119 List all known signal names.
120
121
122 __-m__
123
124
125 ''name'' specifies a file on a mounted file system or a
126 block device that is mounted. All processes accessing files
127 on that file system are listed. If a directory file is
128 specified, it is automatically changed to ''name''/. to
129 use any file system that might be mounted on that
130 directory.
131
132
133 __-n__ ''space''
134
135
136 Select a different name space. The name spaces __file__
137 (file names, the default), __udp__ (local UDP ports), and
138 __tcp__ (local TCP ports) are supported. For ports,
139 either the port number or the symbolic name can be
140 specified. If there is no ambiguity, the shortcut notation
141 ''name''__/__''space'' __(e.g.__
142 ''name''__/__''proto''__) can be
143 used.__
144
145
146 __-s__
147
148
149 Silent operation. __-u__ and __-v__ are ignored in
150 this mode. __-a__ must not be used with
151 __-s__.
152
153
154 __-__''signal''
155
156
157 Use the specified signal instead of SIGKILL when killing
158 processes. Signals can be specified either by name (e.g.
159 __-HUP__) or by number (e.g. __-1__).
160
161
162 __-u__
163
164
165 Append the user name of the process owner to each
166 PID.
167
168
169 __-v__
170
171
172 Verbose mode. Processes are shown in a __ps__-like style.
173 The fields PID, USER and COMMAND are similar to __ps__.
174 ACCESS shows how the process accesses the file. If the
175 access is by the kernel (e.g. in the case of a mount point,
176 a swap file, etc.), __kernel__ is shown instead of the
177 PID.
178
179
180 __-V__
181
182
183 Display version information.
184
185
186 __-4__
187
188
189 Search only for IPv4 sockets. This option must not be used
190 with the __-6__ option and only has an effect with the
191 tcp and udp namespaces.
192
193
194 __-6__
195
196
197 Search only for IPv6 sockets. This option must not be used
198 with the __-4__ option and only has an effect with the
199 tcp and udp namespaces.
200
201
202 __-__
203
204
205 Reset all options and set the signal back to
206 SIGKILL.
207 !!FILES
208
209
210 /proc location of the proc file system
211 !!EXAMPLES
212
213
214 __fuser -km /home__ kills all processes accessing the
215 file system /home in any way.
216
217
218 __if fuser -s /dev/ttyS1; then :; else__
219 ''something''__; fi__ invokes ''something'' if no
220 other process is using /dev/ttyS1.
221
222
223 __fuser telnet/tcp__ shows all processes at the (local)
224 TELNET port.
225 !!RESTRICTIONS
226
227
228 Processes accessing the same file or file system several
229 times in the same way are only shown once.
230
231
232 If the same object is specified several times on the command
233 line, some of those entries may be ignored.
234
235
236 __fuser__ may only be able to gather partial information
237 unless run with privileges. As a consequence, files opened
238 by processes belonging to other users may not be listed and
239 executables may be classified as mapped only.
240
241
242 Installing __fuser__ SUID root will avoid problems
243 associated with partial information, but may be undesirable
244 for security and privacy reasons.
245
246
247 __udp__ and __tcp__ name spaces, and UNIX domain
248 sockets can't be searched with kernels older than
249 1.3.78.
250
251
252 __udp__ and __tcp__ currently work with IPv6 and IPv4,
253 but the address fields can only be IPv4
254 addresses.
255
256
257 Accesses by the kernel are only shown with the __-v__
258 option.
259
260
261 The __-k__ option only works on processes. If the user is
262 the kernel, __fuser__ will print an advice, but take no
263 action beyond that.
264 !!AUTHOR
265
266
267 Werner Almesberger
268 !!SEE ALSO
269
270
271 kill(1), killall(1), lsof(8), ps(1), kill(2)
272 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.