File Control Blocks and Inodes
What You'll Learn
You'll understand the metadata structures that operating systems use to track everything about a file—from who owns it to where its data lives on disk.
The Core Idea
When you create a file, the file system doesn't just store your data. It needs to remember attributes like size, permissions, timestamps, and crucially, where on disk the file's blocks are stored. This metadata is kept in a special structure.
File Control Block (FCB) is the generic term for a data structure that stores all metadata about a single file. Different systems call it different things:
- Unix/Linux: calls it an inode (index node)
- Windows (NTFS): uses a Master File Table (MFT) entry
- Older systems: sometimes called a "file descriptor block"
What's Inside an FCB/Inode?
Think of an inode as a file's "identity card." It typically contains:
- File type (regular file, directory, symbolic link)
- Permissions (read/write/execute for owner/group/others)
- Owner and group IDs
- File size in bytes
- Timestamps: creation, last access, last modification
- Link count (how many directory entries point to this file)
- Pointers to data blocks: the disk addresses where the file's actual content lives
Notably, the inode does not store the file name—that's kept in the directory structure. Multiple names can point to the same inode (hard links).
The Analogy
Imagine a library catalog card. The card tells you the book's author, publication date, and shelf location—but not the book's title on the spine. The directory is like the card catalog index that maps titles to catalog cards.
Key Takeaway: File Control Blocks (inodes in Unix) are the metadata structures storing file attributes, permissions, and pointers to the disk blocks containing actual file data—everything the OS needs except the filename itself.