GCFA · Question #244
Which of the following commands is used to enforce checking of a file system even if the file system seems to be clean?
The correct answer is A. e2fsck -f. The e2fsck -f flag forces a full filesystem check even when the filesystem superblock is marked as clean and the check would normally be skipped.
Question
Which of the following commands is used to enforce checking of a file system even if the file system seems to be clean?
Options
- Ae2fsck -f
- Be2fsck -p
- Ce2fsck -b
- De2fsck -c
How the community answered
(34 responses)- A79% (27)
- B12% (4)
- C3% (1)
- D6% (2)
Why each option
The e2fsck -f flag forces a full filesystem check even when the filesystem superblock is marked as clean and the check would normally be skipped.
The -f (force) option instructs e2fsck to perform a complete check of an ext2/ext3/ext4 filesystem regardless of whether the superblock indicates the filesystem was cleanly unmounted. Without -f, e2fsck exits immediately on a clean filesystem; the -f flag overrides this skip behavior and runs the full integrity check unconditionally.
e2fsck -p runs the utility in automatic preen mode, which repairs only safe, non-destructive errors without user prompting, but does not force a check on a filesystem already marked as clean.
e2fsck -b specifies an alternative superblock to use when the primary superblock is damaged or unreadable, and does not affect whether a clean filesystem is checked.
e2fsck -c invokes the badblocks program to scan for bad sectors on the underlying device, which is a separate hardware-level test rather than a forced filesystem integrity check.
Concept tested: e2fsck force check option on clean filesystems
Source: https://man7.org/linux/man-pages/man8/e2fsck.8.html
Topics
Community Discussion
No community discussion yet for this question.