0

Can you show with some picture or illustration what does an inode of a directory in ext4 filesystem?

Especially, how is the list of directory entries (list of filename-inode pairings) stored?.

3
  • 2
    the inode of a directory stores exactly the same metadata as the inode of any file: the file type, permissions, owner, group, timestamps, size, link count, the location of the data blocks (and probably some other stuff I forgot). It doesn't store the data itself. Commented Feb 29, 2024 at 19:50
  • also, I do recommend you consider inodes an implementation detail (though one that leaks into userland). The fact that Linux tells you an inode number for every file on a file system is not because every file system has inodes, but because Linux makes it look like it does. Chances are, the file system you're using doesn't even have inodes. "Unix-Style" isn't very specific. Unix-style systems use ZFS, Btrfs, even FAT32 for storage. I'm really not convinced any of their metadata structures really represent quite well what you seem to think an inode does. Commented Feb 29, 2024 at 21:00
  • so, if you want to know what is stored in a file system as directory metadata, you will have to be specific about the file system! If you don't, all we can give you is "exactly the information that ls -ld directoryname tells you, plus all the implementation-specific extensions, which might include things like extended attributes (used for free-form metadata, or ACLs, or SELinux context, or…), quotas, inlined content listing, indices, compression and or encryption information, subvolume identifiers…" Commented Feb 29, 2024 at 21:05

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.