File Systems
A file system is the way an operating system organises files and directories on a storage device. It lets people and applications use meaningful names and paths instead of dealing directly with raw storage locations.
Files, directories and paths
A file is a named collection of data.
A directory (or folder) stores names and references to files and other directories.
A path identifies where an item is located.
For example, C:\Users\Asha\notes.txt is a Windows-style path. Linux commonly uses paths such as /home/asha/notes.txt.
Metadata
A file system records information about files called metadata. This can include:
File name and type
Size
Owner
Permissions
Creation or modification times
Where the file’s data is stored
The file’s contents are the data; metadata describes and helps manage that data.
How a file is accessed
When an application opens a file:
It asks the OS to open the file.
The OS checks the path and the user’s permissions.
The file system locates the file’s storage information.
The OS uses the appropriate driver to request data from the device.
The OS returns the data or an error to the application.
This connects file systems to OS services, permissions, device drivers and storage hardware.
Permissions and least privilege
Permissions control who may read, write or execute a file. For example, a project report might be readable by a team but editable only by its owner.
Least privilege means giving users and programs only the access they need to do their work. This reduces the harm caused by mistakes or compromised accounts.
File-system examples
Common file systems include:
NTFS, commonly used by Windows.
FAT32 and exFAT, often used for removable storage and compatibility.
ext4, commonly used by Linux.
APFS, used by Apple systems.
Different file systems support different features, limits and operating systems.
Reliability and security
Journaling records planned file-system changes so the system can recover more safely after an interruption.
Backups provide a separate copy for recovery after deletion, damage or attack.
Permissions limit access to files.
Encryption can help protect data if a device is lost or stolen.
File-system permissions and backups serve different purposes: permissions control access; backups help restore data.
Key terms to remember
File system · file · directory · path · metadata · permissions · owner · least privilege · journaling · backup
Check your understanding
What does a file system do?
What is metadata? Give two examples.
What happens when an application opens a file?
How does least privilege apply to file permissions?
How is a backup different from a permission setting?
Answers:
It organises files and directories and maps them to storage.
Information about a file, such as its size, owner, permissions or modification time.
The OS checks the request and permissions, locates the file through the file system, then retrieves data through the driver and device.
Give each user or program only the file access needed for its work.
A backup is a separate copy used for recovery; a permission setting controls who may access a file.