fuser

Name

fuser -- identify processes using files or sockets

Description

The specification for "fuser" is as specified in the SUS but with the following differences as listed below.

Differences

-a

Show all files specified on the command line. By default, only files that are accessed by at least one process are shown.

-c

This option as specified in the SUS is not supported.

-f

This option as specified in the SUS is not supported.

-k

Kill processes accessing the file. Unless changed with -signal, SIGKILL is sent. An fuser process never kills itself, but may kill other fuser processes. The effective user ID of the process executing fuser is set to its real user ID before attempting to kill.

-i

Ask the user for confirmation before killing a process. This option is silently ignored if -k is not present too.

-l

List all known signal names.

-m

name specifies a file on a mounted file system or a block device that is mounted. All processes accessing files on that file system are listed. If a directory file is specified, it is automatically changed to name/. to use any file system that might be mounted on that directory.

-n space

Select a different name space. The name spaces file (file names, the default), udp (local UDP ports), and tcp (local TCP ports) are supported. For ports, either the port number or the symbolic name can be specified. If there is no ambiguity, the shortcut notation name/space (e.g. name/proto) can be used.

-s

Silent operation. -u and -v are ignored in this mode. -a must not be used with -s.

-signal

Use the specified signal instead of SIGKILL when killing processes. Signals can be specified either by name (e.g. -HUP) or by number (e.g. -1).

-v

Verbose mode.

-V

Display version information.

-

Reset all options and set the signal back to SIGKILL.