tldr/pages/linux/fuser.md

25 lines
666 B
Markdown
Raw Permalink Normal View History

2015-12-30 17:16:51 +00:00
# fuser
> Display process IDs currently using files or sockets.
> More information: <https://manned.org/fuser>.
2015-12-30 17:16:51 +00:00
2019-12-29 06:52:10 +00:00
- Find which processes are accessing a file or directory:
2015-12-30 17:16:51 +00:00
2019-12-29 06:52:10 +00:00
`fuser {{path/to/file_or_directory}}`
- Show more fields (`USER`, `PID`, `ACCESS` and `COMMAND`):
`fuser --verbose {{path/to/file_or_directory}}`
- Identify processes using a TCP socket:
`fuser --namespace tcp {{port}}`
- Kill all processes accessing a file or directory (sends the `SIGKILL` signal):
`fuser --kill {{path/to/file_or_directory}}`
- Find which processes are accessing the filesystem containing a specific file or directory:
`fuser --mount {{path/to/file_or_directory}}`