FUSER

Section: Misc. Reference Manual Pages (1M)
Index Return to Main Contents
 

NAME

fuser - find processes using a file or filesystem  

SYNOPSIS

fuser [-ku] files [...]  

DESCRIPTION

Fuser searches the kernel's internal tables to find all processes that are accessing the listed files. If one of the files is a block special file (such as a disk) then fuser finds processes that are accessing any file on that device. Fuser lists on its standard output the process ID of each process found to be using any of the files specified. The process IDs will be followed by the letters c, r, or p, if the file is open as the current directory, root directory, or parent directory of the process, respectively. (The kernel has a process' parent directory "open" for internal use under certain conditions.)  

OPTIONS

The -k option causes fuser to attempt to kill each process found with the SIGKILL signal (normal permission controls apply; see kill(2)). The -u option causes fuser to print, in parentheses, the user ID of the owner of each process listed. Options may be re-specified between filenames; a '-' argument by itself turns off the -k and -u options. The process IDs are written to standard output, one line per file searched for. Other output is written to standard error.  

EXAMPLES

fuser /tmp/foo
This prints the process IDs of all processes that have the file /tmp/foo open.
fuser -u /dev/fp021
This finds all processes that are accessing any file on the disk /dev/fp021. The process IDs and user names of the process owners are listed. This is useful to find out why a disk can not be unmounted.
fuser -k /dev/fp021
umount /dev/fp021
If run by super-user, this kills all processes that are preventing the disk /dev/fp021 from being unmounted, and then unmounts the disk.
 

BUGS

If a process's user area is swapped (happens on some versions of UNIX) fuser will print a warning and ignore that process.


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLES
BUGS

This document was created by man2html, using the manual pages.
Time: 21:54:09 GMT, February 02, 2023