Anyone ever use fuser,
i tried this command fuser /database.bk
but it only returns datbase.bk:
I read some of the forums online, one of them said when he used fuser, it broke down the box, i really don't want that happen.
I thought fuser is to see who is accessing that file, right?
any help is greatly appreciated. i have been searching online, and there is not that much help on fuser.
The command fuser is used to list processes using a file. If nothing is return, then the file is not use by anyone at that time. If the file is used, you will get the PID of users using the file:
thanks for your reply. yes, you are right, no one was using that file.
yes, it is strange that fuser will bring down the system. don't think so either.
Strange question, but.. how do you actually OPEN a file to test this behaivour ? I ask this because I tried with vi thefile but fuser shows another process different than the session where I actually executed vi thefile. Which leads me to think that probably vi open up a new version of the file to edit it.
Thanks Perderabo. And I was wrong, problem is that I was using echo $$ before I ran vi somefile, and obviously, the process invoked by 'vi somefile' is different than the one I was seeing from the terminal. I just needed to use ps to see the process vi actually used when fuser'ing the file. Great!