2 .\" Copyright 1989 AT&T Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH FUSER 1M "Oct 21, 2003"
8 fuser \- identify users of files and devices
12 \fB/usr/sbin/fuser\fR [\fB-c\fR | \fB-d\fR | \fB-f\fR] [\fB-nu\fR] [\fB-k\fR | \fB-s\fR \fIsig\fR] \fIfiles\fR
13 [ [\fB- \fR] [\fB-c\fR | \fB-d\fR | \fB-f\fR] [\fB-nu\fR] [\fB-k\fR | \fB-s\fR \fIsig\fR] \fIfiles\fR] ...
19 The \fBfuser\fR utility displays the process \fBID\fRs of the processes that
20 are using the \fIfiles\fR specified as arguments.
23 Each process \fBID\fR is followed by a letter code. These letter codes are
24 interpreted as follows. If the process is using the file as
31 Indicates that the process is using the file as its current directory.
40 Indicates that the process is using a file mapped with \fBmmap\fR(2). See
41 \fBmmap\fR(2) for details.
50 Indicates that the process is holding a non-blocking mandatory lock on the
60 Indicates that the process is using the file as an open file.
69 Indicates that the process is using the file as its root directory.
78 Indicates that the process is using the file as its text file.
87 Indicates that the process is using the file as its controlling terminal.
92 For block special devices with mounted file systems, all processes using any
93 file on that device are listed. For all types of files (text files,
94 executables, directories, devices, and so forth), only the processes using that
98 For all types of devices, \fBfuser\fR also displays any known kernel consumers
99 that have the device open. Kernel consumers are displayed in one of the
105 [\fImodule_name\fR,dev_path=\fIpath\fR]
106 [\fImodule_name\fR,dev=(\fImajor\fR,\fIminor\fR)]
107 [\fImodule_name\fR,dev=(\fImajor\fR,\fIminor\fR),dev_path=\fIpath\fR]
114 If more than one group of files are specified, the options may be respecified
115 for each additional group of files. A lone dash cancels the options currently
119 The process IDs are printed as a single line on the standard output, separated
120 by spaces and terminated with a single new line. All other output is written on
124 Any user can run fuser, but only the superuser can terminate another user's
129 The following options are supported:
136 Reports on files that are mount points for file systems, and any files within
137 that mounted file system.
146 Report device usage information for all minor nodes bound to the same device
147 node as the specified minor node. This option does not report file usage for
148 files within a mounted file system.
157 Prints a report for the named file, not for files within a mounted file system.
166 Sends the \fBSIGKILL\fR signal to each process. Since this option spawns kills
167 for each process, the kill messages may not show up immediately (see
168 \fBkill\fR(2)). No signals will be sent to kernel file consumers.
177 Lists only processes with non-blocking mandatory locks on a file.
183 \fB\fB-s\fR \fIsig\fR\fR
186 Sends a signal to each process. The \fIsig\fR option argument specifies one of
187 the symbolic names defined in the \fB<signal.h>\fR header, or a decimal integer
188 signal number. If \fIsig\fR is a symbolic name, it is recognized in a
189 case-independent fashion, without the \fBSIG\fR prefix. The \fB-k\fR option is
190 equivalent to \fB-s\fR \fBKILL\fR or \fB-s\fR \fB9\fR. No signals will be sent
191 to kernel file consumers.
200 Displays the user login name in parentheses following the process \fBID\fR.
205 \fBExample 1 \fRReporting on the Mount Point and Files
208 The following example reports on the mount point and files within the mounted
214 example% \fBfuser -c /export/foo\fR
220 \fBExample 2 \fRRestricting Output when Reporting on the Mount Point and Files
223 The following example reports on the mount point and files within the mounted
224 file system, but the output is restricted to processes that hold non-blocking
230 example% \fBfuser -cn /export/foo\fR
236 \fBExample 3 \fRSending SIGTERM to Processes Holding a Non-blocking Mandatory
240 The following command sends \fBSIGTERM\fR to any processes that hold a
241 non-blocking mandatory lock on file \fB/export/foo/my_file\fR.
246 example% \fBfuser -fn -s term /export/foo/my_file\fR
251 .SH ENVIRONMENT VARIABLES
254 See \fBenviron\fR(5) for descriptions of the following environment variables
255 that affect the execution of \fBfuser\fR: \fBLANG\fR, \fBLC_ALL\fR
256 \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
260 See \fBattributes\fR(5) for descriptions of the following attributes:
268 ATTRIBUTE TYPE ATTRIBUTE VALUE
270 Interface Stability Standard
276 \fBps\fR(1), \fBmount\fR(1M), \fBkill\fR(2), \fBmmap\fR(2), \fBsignal\fR(3C),
277 \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
281 Because \fBfuser\fR works with a snapshot of the system image, it may miss
282 processes that begin using a file while \fBfuser\fR is running. Also, processes
283 reported as using a file may have stopped using it while \fBfuser\fR was
284 running. These factors should discourage the use of the \fB-k\fR option.