What exactly happens to the directory entry when a file is renamed?
Is it that the entry of the oldfile is flushed and the newfile is replaced at it's place or a completely new entry is made at the end of the directory entry?
Asked
Active
Viewed 122 times
1
Bhagyesh Dudhediya
- 704
- 8
- 19
-
Please clarify about which filesystem you are talking. For example not every filesystem stores directory entries in a list. – Thomas Erker Sep 08 '15 at 16:57
-
I am talking about ext4. But also would like to know about ext2, ext3 filesystems. – Bhagyesh Dudhediya Sep 08 '15 at 17:04
-
2Why do you want to know this? It's an internal detail of the filesystem implementation of it's directory structure not observable from the outside. If you care about the internals, look at the code. If you care about observable properties (like performance), ask specific question about them. – Thomas Erker Sep 08 '15 at 20:44
-
2Your question looks a bit like you are asking about dentries that are kept by VFS. But comments say you mean Ext4 internals. – ArekBulski Oct 27 '15 at 23:45