fuser

Name

fuser -- identify processes using files or sockets

Description

fuser is as specified in the SUS but with differences as listed below.

Differences

-a

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

-c

has implementation-dependent behavior.

-f

has implementation-dependent behavior.

-k

kills 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

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

-l

lists 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

selects 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

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

-signal

uses 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

displays version information.

-

resets all options and set the signal back to SIGKILL.