GCFA · Question #286
Which of the following fsck commands will you use to check all filesystems listed in /etc/fstab?
The correct answer is C. fsck -A. The fsck -A flag instructs the utility to check all filesystems listed in /etc/fstab in a single pass. This is the standard option for performing a comprehensive filesystem check across all configured filesystems.
Question
Which of the following fsck commands will you use to check all filesystems listed in /etc/fstab?
Options
- Afsck -f
- Bfsck -P
- Cfsck -A
- Dfsck -y
How the community answered
(45 responses)- A7% (3)
- B16% (7)
- C73% (33)
- D4% (2)
Why each option
The fsck -A flag instructs the utility to check all filesystems listed in /etc/fstab in a single pass. This is the standard option for performing a comprehensive filesystem check across all configured filesystems.
The -f flag forces fsck to check a filesystem even if it appears clean (has the clean flag set), but it does not cause fsck to iterate through all filesystems in /etc/fstab.
The -P flag is a supplementary option used with -A to check the root filesystem in parallel with other filesystems, but it does not on its own check all filesystems in /etc/fstab.
The -A flag causes fsck to iterate through all entries in /etc/fstab and attempt to check each listed filesystem in the order determined by the pass number (fs_passno field). This is equivalent to running fsck individually against every filesystem defined in the fstab configuration file.
The -y flag automatically answers 'yes' to all fsck repair prompts, but it does not control which filesystems are checked or cause fsck to read from /etc/fstab.
Concept tested: Linux fsck command flags for filesystem checking
Source: https://man7.org/linux/man-pages/man8/fsck.8.html
Topics
Community Discussion
No community discussion yet for this question.