IT lexicon › Infra & Ops › Directory entry

Directory entry

Infra & Ops På svenska → Updated: 2026-11-16

A record in a directory file mapping a filename to an inode or MFT entry; without it, a file is "gone" despite data still on disk.

Directories in Unix are simply files containing a list of directory entries. Each entry is classically 32 bytes: inode number (4), record length (2), name length (1), file type (1), and the filename. When you `ls` a directory, the filesystem merely reads the directory file. Deleting an entry means setting its length field to zero and "compacting" the next entry to fill the gap.

Windows NTFS stores directory entries as collections of MFT records rather than a dedicated directory file. Regardless of format, a deleted directory entry is what makes a file inaccessible, even though the inode table and data blocks remain intact—which is why `fsck` can locate "orphaned" inodes and create recovery files.

← Back to the lexicon