Next  Contents  Prev

Directory Entry Layout


This slide represents one directory entry, remember you always have at least “.” and “..”

The Inode is 4 bytes long.

Record length is the total length including Inode.

Name Length is one byte giving a max filename of 255 characters.

File type is the type of file as pipe, block or regular.

Note file type only appeared in later revisions of the ext2fs directory entry and this breaks a lot of older disk editors.

File name is just a string of characters.

Linux pads the entry to the next 4 byte boundary.

The observant may have noticed that Record Length and Name Length are

redundant this is not the case as we will see next when talk about how ext2fs deletes a file.

Next  Contents  Prev