A systems administrator manages multiple Linux servers and needs to set up a reliable and secure way to
handle the complexity of managing event records on the OS and application levels. Which of the following
should the administrator do?
Correct answer:
B. Implement a centralized log aggregation solution.
Explanation:
Managing multiple Linux servers means logs are scattered across different machines and applications.
A centralized log aggregation solution (e.g., ELK Stack, Splunk, Graylog, Fluentd) collects logs from all servers and applications into a single, secure location.
Benefits:
Simplifies troubleshooting and auditing.
Provides real-time monitoring and alerting.
Enhances security by preventing tampering with local logs.
Enables correlation of events across systems.
❌ Why the Other Options Are Wrong
Create an automated process to retrieve logs from the server by demand → Reactive and inefficient; doesn’t scale well.
Configure daily automatic backups of logs to remote storage → Provides redundancy but not real-time visibility or correlation.
Deploy log rotation procedures to manage the records → Prevents log files from growing too large, but doesn’t address complexity across multiple servers.
📖 Reference
Red Hat Documentation: Centralized logging improves monitoring and security.
CompTIA Linux+ XK0-006 Exam Objectives: Log Management and Monitoring (Domain: Security).
Question 12Choose 1
An administrator needs to remove the directory /home/user1/data and all of its contents. Which of the
following commands should the administrator use?
Correct answer:
C. rm -r /home/user1/data
Explanation:
The rm (remove) command is the primary utility for deleting files and directories in Linux. -r (Recursive): This flag is essential when dealing with directories. It instructs the command to descend into the specified directory and remove all files, subdirectories, and the target directory itself. Effectiveness: Without the -r (or -R) flag, rm will fail when targeting a directory, reporting that it cannot remove a directory. Safety Note: Administrators often use -rf (recursive and force) to bypass confirmation prompts, though this should be used with extreme caution.
Explanation of Incorrect Answers rmdir -p /home/user1/data: The rmdir command is designed to remove empty directories only. The -p (parents) flag allows for the removal of a directory and its ancestors if they are also empty. If /home/user1/data contains any files or subdirectories, this command will fail with an "Directory not empty" error.
ln -d /home/user1/data: The ln command is used to create links between files. The -d flag is a restricted option that allows the superuser to attempt to make a hard link to a directory, which is generally not permitted on most modern Linux filesystems to prevent loops. It does not delete data.
cut -d /home/user1/data: The cut command is a text processing utility used to extract sections (columns) from lines of files. The -d flag specifies a delimiter for parsing text. It has no capability to delete files or directories.
Reference
CompTIA Exam Objective: Domain 1.0 (System Management) – Subsection 1.1: "Summarize and utilize Linux command line tools" (specifically File and Directory Management).
Reference: Linux Man Pages (man rm, man rmdir); Official CompTIA Linux+ Study Guide, Chapter on File and Directory Management.
Question 13Choose 1
Which of the following commands should an administrator use to convert a KVM disk file to a different
format?
Correct answer:
D. qemu-img
Explanation:
The qemu-img command is the standard QEMU/KVM utility used to create, convert, modify, and inspect virtual disk images.
Administrators commonly use it to convert disk images between formats such as:
- qcow2 (QEMU Copy-On-Write)
- raw
- vmdk (VMware)
- vdi (VirtualBox)
- vhd/vpc
Example conversion:
qemu-img convert -f qcow2 -O raw disk.qcow2 disk.raw
-f → source format -O → output format
This is exactly the tool required when working with KVM virtual machine storage.
❌ Why the Other Options Are Incorrect qemu-kvm:
Used to run virtual machines using KVM acceleration. It launches VMs but does not manage or convert disk images.
qemu-ng:
Not a valid standard QEMU command. Likely a distractor option.
qemu-io:
Used for low-level disk I/O testing and debugging. Helpful for performance testing or examining image behavior. Not intended for format conversion.
🧠 Linux+ Exam Tip
For CompTIA Linux+:
VM disk management → think qemu-img
Running VMs → qemu-system-* / qemu-kvm
Storage conversion tasks almost always map to qemu-img.
That's the last free question in System Management
You've seen the free 30% of this topic (13 of 45 questions). Get complete access for every question, explanation and the timed mock exam.