This is a discussion on What happens to the directory entry of a file when it is deleted using rm within the Linux Administration forums, part of the Linux Forums category; Does anyone know what exactly happens to the directory entry of a file when that file is deleted? (Assuming you ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Does anyone know what exactly happens to the directory entry of a file
when that file is deleted? (Assuming you used the standard rm command and you are using the ext2fs) Is the entry zeroed out? Or is it "simply included in the slack space of the previous entry" (the Grugq -- Phrack, issue 59)? I read the Design and Implementation of the Second Extended Filesystem (http://e2fsprogs.sourceforge.net/ext2intro.html), and it didn't confirm the Grugq's claim. I would appreciate any and all help. Thanks, --Trost |
|
|||
|
Without hesitation, J Trost asserted (on or about 07/22/03 22:09) that:
> Does anyone know what exactly happens to the directory entry of a file > when that file is deleted? (Assuming you used the standard rm command > and you are using the ext2fs) Is the entry zeroed out? Or is it > "simply included in the slack space of the previous entry" (the Grugq > -- Phrack, issue 59)? I read the Design and Implementation of the > Second Extended Filesystem > (http://e2fsprogs.sourceforge.net/ext2intro.html), and it didn't > confirm the Grugq's claim. In the 2.4.21 kernel source, fs/ext2/dir.c has the following comments associated with the function that deletes directory entries... /* * ext2_delete_entry deletes a directory entry by merging it with the * previous entry. Page is up-to-date. Releases the page. */ The code seems to do what the comment suggests that it does. -- Lew Pitcher Master Codewright and JOAT-in-training Registered Linux User #112576 (http://counter.li.org/) Slackware - Because I know what I'm doing. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|