fuser(8) CLIX fuser(8)
NAME
fuser - Identifies processes using a file or file structure
SYNOPSIS
/etc/fuser [-ku] files|resources [[-] [-ku] files|resources ... ]
FLAGS
-u The user login name, in parentheses, also follows the process ID.
-k The SIGKILL signal is sent to each process. Since this flag spawns
the kill program for each process, the kill messages may not show up
immediately. (See kill(2)).
If more than one group of files are specified, the flags may be
respecified for each additional group of files. A lone dash cancels the
flags currently in force; then, the new set of flags applies to the next
group of files.
The process IDs are displayed as a single line on stdout, separated by
spaces and terminated with a single newline. All other output is written
on stderr.
You cannot list processes using a particular file from a remote resource
mounted on your machine. You can only use the resource name as an
argument.
Any user with ``read'' permission for the /dev/kmem and /dev/mem files can
use the fuser command. Only the superuser can terminate another user's
process.
DESCRIPTION
The fuser command outputs the process IDs of all processes that are using
the files or remote resources specified arguments. Each process ID is
followed by a letter code, interpreted as whether or not the process is
using the file as:
1. Its current directory, the code is c,
2. The parent of its current directory (only when the file is being used
by the system), the code is p,
3. Its root directory, the code is r.
For block special devices with mounted file systems, all processes using
any file on that device are listed. For remote resource names, all
processes using any file associated with that remote resource (Remote File
Sharing) are reported. (The fuser command cannot use the mount point of
2/94 - Intergraph Corporation 1
fuser(8) CLIX fuser(8)
the remote resource; it must use the resource name.) For all other types
of files (text files, executables, directories, devices, and so on), only
the processes using that file are reported.
EXAMPLES
1. To report all files being used for the /usr file system:
fuser /usr
2. To report all process IDs presently using the file printfile, along
with the user who owns each process:
fuser -u printfile
3. To kill all processes which are using a file in the file system
mounted at mnt.
fuser -k mnt
FILES
/unix For system namelist
/dev/kmem For system image
/dev/mem Also for system image
DIAGNOSTICS
The fuser command returns the following diagnostic message:
file not found
The specified file could not be found, or does not exist.
EXIT VALUES
Exits with a nonzero value if an error occurs.
RELATED INFORMATION
Commands: mount(8), ps(1)
Functions: kill(2), signal(2)
2 Intergraph Corporation - 2/94