Quote:
Originally Posted by stf92
EDIT: who zeroed the rest of the block? Vim or the OS?
EDIT EDIT: On second thought it would be unlikely that Vim would to that. The zeroing of the rest of the block had to be managed by the OS itself. I wonder why? I do not see the need for clearing the rest of the block.
|
When
vim saves a file, it does not overwrite the original. It creates a new file and then, once that file has been written successfully, renames it over the original. The saved file uses a new inode and disk blocks, so the
fibmap report on the saved file tells you nothing about where the original file was stored on the disk.
If done promptly, the
debugfs utility might have allowed you to locate that original, now deleted, inode and recover the file content. By now, that data has likely been overwritten since some file allocators select from the free block list on a "last in, first out" basis.