![]() ![]() Step 3: List the process for confirming the open process ps -ef | grep 8561 | grep -v grep Note: Here the number is 8561 but in your case, it might be different so use the commands accordingly. Step 2: Run something that will hold the file open: tail -f /tmp/test & Step 1: Make a test file inside the /tmp directory touch /tmp/test This happens because the inode is still active, so the data blocks are still on the disk until the application holding it open closes it. Sometimes an open file is deleted accidentally, in that case, lsof command is a life-saving command to recover that file.Ī copy of the file is recreated with the help of lsof command before the file is being closed by the application holding it open.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |