File system basics examples: Windows
1. What a File System Does
A file system is the part of the OS that organises data on storage devices: it gives every collection of related data a name, arranges files in folders (directories), keeps track of which disk blocks belong to which file, and enforces access permissions. It turns a raw disk (sectors, tracks, cylinders) into the familiar world of files, folders, paths and extensions.
File attributes: name (with extension such as .docx, .exe, .mp4), size, type, location, creation/modified/accessed timestamps, owner, and attributes such as Read-only, Hidden, System, Archive in Windows.
File operations: create, open, read, write, append, seek, rename, delete, truncate, copy, change attributes. The OS keeps an open-file table with a per-process file pointer.
2. Windows File System Organisation
- Drive letters identify volumes:
C:(system),D:,E:…A:/B:for legacy floppy drives. Each volume has its own root folder. - **Backslash
\** separates components; drive letters are **not case sensitive** (C:\Users=c:\users). - Paths — absolute:
C:\Users\Raiyan\Documents otes.docx; relative:.. otes.docx(parent folder),.(current folder).
C:\
├── Windows\ operating system files (System32, WinSxS, drivers)
├── Program Files\ 64-bit installed applications
├── Program Files (x86)\ 32-bit applications
├── Users\
│ └── Raiyan\ Desktop, Documents, Downloads, Pictures, Videos, AppData
├── ProgramData\ application data shared by all users (hidden)
├── Temp\ temporary files (also %TEMP% per user)
└── $Recycle.Bin\ deleted files awaiting permanent removal (hidden)
3. Windows File Systems
| File system | Max file size | Max volume size | Journaling | Security | Notes |
|---|---|---|---|---|---|
| FAT16 | 2 GB | 4 GB (2 GB typical) | No | None | Very old; USB sticks of small size |
| FAT32 | 4 GB | 32 GB (Windows limit) | No | None | USB drives, memory cards; no file > 4 GB |
| exFAT | 16 EB | 128 PB | No | Limited | Large removable media, cameras |
| NTFS | 16 TB (practical) | 256 TB | Yes ($LogFile) | ACL permissions, encryption (EFS), auditing | Default for Windows system/program/data volumes |
| ReFS | Very large | Very large | Yes | Integrity streams, checksums | Servers, storage spaces; not bootable |
NTFS (New Technology File System) is the one to know: it is a journaling file system that records pending changes in a log so a crash does not corrupt the volume; it stores everything as a record in the Master File Table (MFT), supports per-file security descriptors (ACLs), compression, Encryption File System (EFS), disk quotas, sparse files, alternate data streams, shadow copies and very large files.
4. Disk Space, Allocation and Fragmentation
- Allocation methods: contiguous (fast, hard to grow), linked (FAT chains), indexed (NTFS uses MFT records pointing to clusters). Windows allocates in clusters — the smallest unit, typically 4 KB. A 1-byte file still occupies one full cluster, which is why
sizeandsize on diskdiffer. - Free space is tracked in a bitmap/MFT record of free clusters.
- Fragmentation: as files are created and deleted, a file's clusters scatter across the disk. Because a hard disk's head must physically move, scattered files slow down. Defragmentation (
defrag) rearranges them; SSDs need no defrag and rely on TRIM instead.
5. Working with Files — GUI and Command Line
| Task | Explorer (GUI) | Command line (cmd / PowerShell) |
|---|---|---|
| List a folder | Open the folder window | dir / Get-ChildItem |
| Create a folder | Right-click → New → Folder | md notes / mkdir notes |
| Copy / move | Ctrl+C, Ctrl+V / drag | copy, xcopy, robocopy, move |
| Delete | Delete key (goes to Recycle Bin) | del file.txt (permanent) |
| Rename | F2 or right-click | ren old.txt new.txt |
| Attributes | Properties → General | attrib +h +r file.txt |
| Permissions | Properties → Security | icacls, takeown |
| Search | Search box | findstr, where |
| Disk check | Properties → Tools | chkdsk C: /f |
Useful details: %TEMP%, %USERPROFILE%, %APPDATA% are environment variables that expand to real paths; the Recycle Bin keeps deleted files per volume until emptied; the classic path limit is 260 characters (MAX_PATH), which is why deeply nested folders cause errors; file extensions are hidden by default, so a file may appear as report while really being report.txt.
6. Points of Comparison with Linux
Windows uses drive letters and backslashes, a case-insensitive naming scheme, NTFS with ACLs, and keeps its configuration in the registry. Linux uses a single root /, forward slashes, is case sensitive, uses ext4/XFS with rwx permission bits, and stores configuration in text files under /etc. Both models support the same fundamental ideas — files, folders, paths, permissions, journaling and mounted volumes.
7. Exam Points
- What is a file system? List the file attributes and the basic file operations — 5 marks, frequent.
- Explain the Windows folder structure with the roles of Windows, Program Files, Users and ProgramData — 5 marks.
- Compare FAT32, exFAT and NTFS (size limits, journaling, security) — 5 marks, very frequent.
- Explain NTFS features: journaling, MFT, ACLs, compression, encryption, quotas — 5-7 marks.
- What is fragmentation? How is it corrected and why do SSDs not need defragmentation? — 3-5 marks.
- Differentiate absolute and relative paths with examples — 3 marks.
- Compare the Windows and Linux file system models — 5 marks.