Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  How to find which process a file is being written by in Linux?

Some people ask a file is being written by one process and they want to check this process, but they cannot find the process even with sof.This question is very common and there are many solutions, here we introduce a straightforward method. In Linux, each file will be stored on one device and of course there will be a relative inode, then we can use vfs.write to know who is writing the inode on one specified device continuously. Luckily there is inodewatch.stp in the installation package of systemtap, it locates at /usr/local/share/doc/systemtap/examples/io. It is used foe above.Let take a lo...

4,539 0       LINUX PROCESS FILE WRITE