I am intersted to know how many processes or any other entity whatsover, holds a specific file on the system. I tried to find a way using lsof (I don't want to aggregate all the holders for effectiveness reasons), but couldn't find anything in the man page.
Please note that I don't mean the inode link count that is counting the hardlink count for this specific file on the fs.
Edit: I know now it is possible to use fuser (mentioned in one of the answers below) to get this information, but fuser uses procfs and therefore it is not very efficient. Does anyone knows of any other tool which doesn't iterate procfs?
Thanks.
Try using following command
You can also try