Solving resource contention problems with fuser

Have you ever tried to unmount your USB thumb drive only to get the message "device is busy"? Like me, you probably thought, "I know I closed that file manager window. What's keeping it busy now?" fuser is a command that can answer that question for you, along with similar questions about what processes are using what files or sockets.

The fuser command command takes as an argument either a file path, the name of a mounted filesystem, or a namespace/port combination (eg. Telnet/TCP). If the specified resource is being used, fuser displays the name of the resource along with the ID of each process accessing it, followed by a letter signifying the type of access the process has. The following is a list of possible access types: