This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new Linux.com!

Linux.com

Re:moving / deleting files while using them?

Posted by: Anonymous Coward on November 17, 2006 01:15 PM
As explained in the article, the directory entry that is deleted when you issue 'rm ' does just that. No file is deleted, it is just the directory reference to the inode. If no there are no other references to that inode then, indeed that could be considered deleted. Any open file handles that refer to that inode will keep that inode alive.

So no the file is not removed, just the directory entry to the 'real file' so to speak.

To try to make this clearer, when a process openes a file via its directory entry, it really opens the file (inode entry) that is pointed to by the directory entry. There may be any number of directory entries pointing to the same inode (hard links).

That's how I understand things anyway..

#

Return to Bring back deleted files with lsof