Finding who’s using which file descriptors
shell | n0str0m0 | (0)
Sometimes it is useful to know which processes are using a certain file. You could want to remove the file or move it, or change its name, but it's not a good idea if it's being read/written by someone else. Here is when fuser comes in hand.
fuser shows the PID of the processes using a file descriptor passed as argument.
$> fuser $HOME
$> /home/n0str0m0: 1930c 2005c 2023c 2051c 2068c 2083c 2113c
2115c 2117c 2123c 2137c 2138c 2139c 2145c 2230c 2251c 2255c
2397c 2416c 2419c 2420c 2515c 2520c
The two options I have used the most so far are:
-m: tells you processes using a ...