Identifying which processes are accessing a file or socket
Submitted by madvip on Fri, 01/18/2008 - 16:37.
Sometime you want to know which processes are blocking you from unmounting a directory. To list which processes are accessing a file, directory or socket, you can use the following command:
fuser -c /directory_name
Similarly if you want to SIGKILL these processes you can use the -k switch:
fuser -kc /directory_name
...Quite a handy *nix tool!

