# fuser -m -u /mnt/usb1 /mnt/usb1: 1347c(root) 1348c(guido) 1349c(guido)
fuser displays the PIDs of processes using the specified files or file systems. In the default display mode, each file name is followed by a letter denoting the type of access:
fuser can also be used to check what processes are using a network port:
# fuser -v -n tcp 80 USER PID ACCESS COMMAND 80/tcp: root 3067 F.... (root)httpd apache 3096 F.... (apache)httpd apache 3097 F.... (apache)httpd
fuser returns a non-zero code if none of the files are accessed or in case of a fatal error. If at least one access has succeeded, fuser returns zero. The output of "fuser" may be useful in diagnosing "resource busy" messages arising when attempting to unmount filesystems.
Also note that -k sends a SIGKILL to all process. Use the -signal to send a different signal. For a list of signals supported by the fuser run 'fuser -l'
|This Unix-related article is a stub. You can help Wikipedia by expanding it.|
Here you can share your comments or contribute with more information, content, resources or links about this topic.