Problem Statement
How does the file-system consistency check (fsck) utility work and when is it used?
Explanation
The fsck (file system check) utility is used to check and repair inconsistencies in file-system metadata after a crash or improper shutdown. It scans file-system structures like inode tables, bitmaps, directory entries and free lists to identify orphaned inodes, dead links, incorrect block counts or mismatches. Then it repairs by clearing or reconnecting entries. Explaining when it runs (boot time, manually) and how it helps restore integrity shows deeper OS knowledge. :contentReference[oaicite:7]{index=7}