fuser(1M)
NAME
fuser − identify processes using a file or file structure
SYNOPSIS
/etc/fuser [-nnamelist] [-ccorefile] [-i] [−ku] files [−] [[−ku] files]
DESCRIPTION
fuser lists the process IDs of the processes using the files specified as arguments. For block special devices, all processes using any file on that device are listed. For NFS mounted file systems (specified by the the special syntax hostname:/directory), all process on the local system referencing any file on that file system are listed. The process ID is followed by c, r or t if the process is using the file as its current directory, its root directory, or its text region, respectively.
The process IDs are printed as a single line on the standard output, separated by spaces and terminated with a single new line. All other output is written on standard error.
OPTIONS
The following options may be supplied:
−c corefile Use the file corefile in place of /dev/mem.
−i Find the process which use each of the files in the inode table. However, since the names of these files are unknown, identify each file with the displacement into the inode table, the device number of the device the file resides on, and the inode number of the file.
−k Send the SIGKILL signal to each process. Only the super-user can terminate another user’s process (see kill(2)).
−n namelist Take argument signifying an alternate system namelist in place of /unix.
−u Print the login name, in parentheses, following the process ID.
The −k and −u options may be respecified between groups of files. The new set of −k and −u options replaces the old set, with a lone dash canceling any of these options currently in force.
EXAMPLES
fuser −ku /dev/dsk/1s?
will terminate all processes that are preventing disk drive one from being unmounted if typed by the super-user, listing the process ID and login name of each as it is killed.
fuser −u /etc/passwd
will list process IDs and login names of processes that have the password file open.
fuser −ku /dev/dsk/1s? −u /etc/passwd
will do both of the above examples in a single command line.
FILES
/unix for namelist
/dev/kmem for system image
/dev/mem also for system image
SEE ALSO
mount(1M), ps(1), kill(2), signal(2).
CX/UX Administrator’s Reference