How does a computer find your file among millions?
The word "file system" is older than computers: it began as a way of organising paper in cabinets.
▶ Start the storyA computer finds your file because a file system keeps an organised record of where everything is. A file system governs how files are organised and accessed, and it is a service of the operating system. Without it, programs could use the disk in incompatible ways that lead to contention, corrupted data and data loss.
The name has a charming past. Long before computers, from around 1900, "file system" meant a way of organising, storing and retrieving paper documents. By 1961 the term was being applied to computerised filing too, and the folders and files on your screen still echo it.
Here is how it works. A file system groups files into directories, also called folders, and a file name has to be unique only within its own folder, so two folders can each hold a file with the same name. Beside the contents, the system stores , such as who owns a file and what permissions it has, and it keeps that metadata separate from the file's content. The system also tracks which areas of the storage belong to which file and which are unused.
When you delete a file, the file system records that the file's space is free for another file to use. Under all of this, a lower layer reads and writes blocks on the disk through the device driver, so you never have to know where on the disk anything lives.
256 bytes
Step 1: Logical layer
Open, close, read, write by file name
Step 2: Directories and
Which blocks belong to this file, and who may use them
Step 3: Physical layer
Reads and writes data blocks on the device
Step 4: Device driver
Speaks the disk's own language
Step 5: Storage device
Hard drive, solid-state drive and others
Quiz me
0/3
Recap
A file system maps names and folders to blocks on the disk and keeps notes (metadata) about each file.
💡 A trick to remember it · A librarian who knows each book's name, its shelf and who may borrow it, and writes all three on a card.
Surprising fact · The term 'file system' described paper filing around 1900, long before computers.
Sources (1)
No source, no claim. Every fact in this lesson (16 claims) cites at least one of these.