Files and folders in Linux are accessed by processes of a particular identity. You must know the id of the specific process if you want to perform any action on that process.
It is among the most important tasks of Linux systems administrators. It is involved in a number of activities under supervision, signaling processes, and setting the priorities of processes on the system.
Here at Ibmi Media, we shall look into how to find processes by using the fuser command in Linux.
What is the syntax of the fuser command ?
It's syntax is given below:
$ fuser [options] [file|socket]
$ fuser [options] -SIGNAL [file|socket]
$ fuser -l
Or you can look up usage with the command:
How to use the fuser command ?
1. Check the process detail accessing
$ fuser -v .
This will display USER, PID, ACCESS and COMMAND.
For example, To check the processes accessing of file test, run the below command:
$ fuser -v -m test
2. Kill signal
For example, to kill all the processes, run the command:
$ fuser -k .
To use -ki option to ask yes/no:
$ fuser -ki .
3. List all signals:
$ fuser -l
[Need help in fixing Linux system issues ? We can help you. ]