fuser—Identify processes using files
fuser [–a|–s][–signal][–kmuv] filename … [–][–signal][–kmuv] filename …
fuser displays the PIDs of processes using the specified files or file systems. In the default display mode, each filename is followed by a letter denoting the type of access:
c Current directory.
e Executable being run.
f Open file. f is omitted in default display mode.
r Root directory.
fuser returns a nonzero return code if none of the specified files is accessed or in case of a fatal error. If at least one access has been found, fuser returns zero.
|–a||Show all files specified on the command line. By default, only files that are accessed by at least one
|–k||Kill processes accessing the file. Unless changed with
|u||List all known signal names.|
|–m||filename 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 filename/. to use any file system that might be mounted on that directory.|
|–s||Silent operation. –a, –u, and –v are ignored in this mode.|
|–signal||Use the specified signal instead of SIGKILL when killing processes. Signals can be specified either by name (for example, –HUP) or by number (for example, –1).|
|–u||Append the username of the process owner to each PID.|
|–v||Verbose mode. Processes are shown in a ps-like style. The fields PID, USER, and COMMAND are similar
ACCESS shows how the process accesses the file.
|–||Reset all options and set the signal back to SIGKILL.|