After an unexpected server shutdown, a system administrator unmounted a non-root ext4 filesystem to check it for errors. The administrator needs to run a command that will automatically repair any detected issues without requiring interactive confirmation. Which of the following commands should the administrator use?
The correct command is fsck -y /dev/sdb1. The fsck command is used to check and repair Linux filesystems. The -y option assumes "yes" to all prompts and attempts to fix any detected filesystem errors automatically. The device /dev/sdb1 must be unmounted before running the command to prevent data corruption.
fsck -n /dev/sdb1 is incorrect because the -n option performs a dry run, reporting any issues without attempting to repair them.
xfs_repair /dev/sdb1 is incorrect because xfs_repair is the specific tool for repairing XFS filesystems, not ext4 filesystems.
mkfs.ext4 /dev/sdb1 is incorrect because this command creates a new ext4 filesystem, which would destroy all existing data on the partition.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the fsck command do in Linux?
Open an interactive chat with Bash
Why is the -y option used with fsck?
Open an interactive chat with Bash
When should you not use fsck on a filesystem?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
System Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access