snippetbashTip
fuser — Display process IDs currently using files or sockets. More information: <https://manned.org/fuser>.
Viewed 0 times
commandprocessfuserclicurrentlyusingidsdisplay
linux
Problem
How to use the
fuser command: Display process IDs currently using files or sockets. More information: <https://manned.org/fuser>.Solution
fuser — Display process IDs currently using files or sockets. More information: <https://manned.org/fuser>.Find which processes are accessing a file or directory:
fuser {{path/to/file_or_directory}}Show more fields (
USER, PID, ACCESS, and COMMAND):fuser {{[-v|--verbose]}} {{path/to/file_or_directory}}Identify processes using a TCP socket:
fuser {{port}}/tcpKill all processes accessing a file or directory (sends the
SIGKILL signal):fuser {{[-k|--kill]}} {{path/to/file_or_directory}}Find which processes are accessing the filesystem containing a specific file or directory:
fuser {{[-m|--mount]}} {{path/to/file_or_directory}}Kill all processes with a TCP connection on a specific port:
fuser {{[-k|--kill]}} {{port}}/tcpCode Snippets
Find which processes are accessing a file or directory
fuser {{path/to/file_or_directory}}Show more fields (`USER`, `PID`, `ACCESS`, and `COMMAND`)
fuser {{[-v|--verbose]}} {{path/to/file_or_directory}}Identify processes using a TCP socket
fuser {{port}}/tcpKill all processes accessing a file or directory (sends the `SIGKILL` signal)
fuser {{[-k|--kill]}} {{path/to/file_or_directory}}Find which processes are accessing the filesystem containing a specific file or directory
fuser {{[-m|--mount]}} {{path/to/file_or_directory}}Context
tldr-pages: linux/fuser
Revisions (0)
No revisions yet.