LX0-103 · Question #153
According to the File System Hierarchy Standard, the lost+found directory is used for:
The correct answer is D. unlinked files found by fsck.. The lost+found directory exists on each filesystem to hold file fragments and inodes recovered during a filesystem check. It is populated exclusively by fsck when it finds orphaned data.
Question
According to the File System Hierarchy Standard, the lost+found directory is used for:
Options
- Afiles with unknown owners.
- Bmissing device files found by/proc.
- Cunknown binary files found by find.
- Dunlinked files found by fsck.
How the community answered
(22 responses)- A5% (1)
- C5% (1)
- D91% (20)
Why each option
The lost+found directory exists on each filesystem to hold file fragments and inodes recovered during a filesystem check. It is populated exclusively by fsck when it finds orphaned data.
Files with unknown owners still have valid directory entries and inode references; ownership is a permission attribute separate from the filesystem link count that fsck checks.
The /proc virtual filesystem exposes kernel and process information dynamically at runtime and has no relationship to lost+found or fsck recovery.
The find command is a user-space search utility and does not write discovered files into lost+found; it only reports results to stdout.
When fsck (filesystem check) runs and finds inodes that are not referenced by any directory entry - known as unlinked files - it places them in lost+found for manual recovery. Each filesystem has its own lost+found directory, and fsck uses the pre-allocated space there to reconnect recoverable data that would otherwise be lost after an unclean shutdown or corruption event.
Concept tested: Linux lost+found directory and fsck recovery
Source: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s06.html
Topics
Community Discussion
No community discussion yet for this question.