|FUSER(1)||General Commands Manual||FUSER(1)|
fuserutility writes to standard output the process IDs of processes running on the local system that have one or more of the named files open. If file is a mounted block device, the output will show all processes having files opened on that file system.
The options are as follows:
fuserwill report on any files open in the file system.
options are mutually exclusive.
The name of the file followed by a colon (‘:’) is printed to standard error. The following characters may be printed to standard error after the process ID if the described conditions are true:
fuserutility exits 0 on success, and >0 if an error occurs.
$ fuser -c /mnt
Send SIGTERM to any process holding a file open under the /mnt filesystem:
# fuser -c -s term /mnt
Report on all files opened under the filesystem on which /dev/wd0a is mounted:
$ fuser /dev/wd0a
Report on all processes currently holding /dev/wd0a open:
$ fuser -f /dev/wd0a
fuserutility is compliant with the X/Open System Interfaces option of the IEEE Std 1003.1-2008 (“POSIX.1”) specification.
The flags [
-kMNs] are extensions to that
fuserutility has been available since OpenBSD 4.7.
|October 17, 2017||OpenBSD-current|