CompTIA Linux+ XK0-005 – Question040

A Linux administrator was tasked with deleting all files and directories with names that are contained in the sobelete.txt file. Which of the following commands will accomplish this task?

A.
xargs -f cat toDelete.txt -rm
B. rm -d -r -f toDelete.txt
C. cat toDelete.txt | rm -frd
D. cat toDelete.txt | xargs rm -rf

Correct Answer: B

CompTIA Linux+ XK0-005 – Question039

A systems administrator wants to test the route between IP address 10.0.2.15 and IP address 192.168.1.40.
Which of the following commands will accomplish this task?

A.
route -e get to 192.168.1.40 from 10.0.2.15
B. ip route get 192.163.1.40 from 10.0.2.15
C. ip route 192.169.1.40 to 10.0.2.15
D. route -n 192.168.1.40 from 10.0.2.15

Correct Answer: B

CompTIA Linux+ XK0-005 – Question038

An administrator is trying to diagnose a performance issue and is reviewing the following output:

System Properties:
CPU: 4 vCPU
Memory: 40GB
Disk maximum IOPS: 690
Disk maximum throughput: 44Mbps | 44000Kbps
Based on the above output, which of the following BEST describes the root cause?

A.
The system has reached its maximum IOPS, causing the system to be slow.
B. The system has reached its maximum permitted throughput, therefore iowait is increasing.
C. The system is mostly idle, therefore the iowait is high.
D. The system has a partitioned disk, which causes the IOPS to be doubled.

Correct Answer: B

CompTIA Linux+ XK0-005 – Question037

A systems administrator is checking the system logs. The administrator wants to look at the last 20 lines of a log. Which of the following will execute the command?

A.
tail -v 20
B. tail -n 20
C. tail -c 20
D. tail -l 20

Correct Answer: B

CompTIA Linux+ XK0-005 – Question036

After installing some RPM packages, a systems administrator discovers the last package that was installed was not needed. Which of the following commands can be used to remove the package?

A.
dnf remove packagename
B. apt-get remove packagename
C. rpm -i packagename
D. apt remove packagename

Correct Answer: A

CompTIA Linux+ XK0-005 – Question035

Several users reported that they were unable to write data to the /oracle1 directory. The following output has been provided:

Which of the following commands should the administrator use to diagnose the issue?

A.
df -i /oracle1
B. fdisk -1 /dev/sdb1
C. lsblk /dev/sdb1
D. du -sh /oracle1

Correct Answer: A

CompTIA Linux+ XK0-005 – Question034

A Linux administrator has installed a web server, a database server, and a web application on a server. The web application should be active in order to render the web pages. After the administrator restarts the server, the website displays the following message in the browser: Error establishing a database connection. The Linux administrator reviews the following relevant output from the systemd init files:

The administrator needs to ensure that the database is available before the web application is started. Which of the following should the administrator add to the HTTP server .service file to accomplish this task?

A.
TRIGGERS=mariadb.service
B. ONFAILURE=mariadb.service
C. WANTEDBY=mariadb.service
D. REQUIRES=mariadb.service

Correct Answer: D

CompTIA Linux+ XK0-005 – Question033

A Linux administrator is troubleshooting an issue in which an application service failed to start on a Linux server. The administrator runs a few commands and gets the following outputs:

Based on the above outputs, which of the following is the MOST likely action the administrator should take to resolve this issue?

A.
Enable the logsearch.service and restart the service.
B. Increase the TimeoutStartUSec configuration for the logsearch.sevice.
C. Update the OnCalendar configuration to schedule the start of the logsearch.service.
D. Update the KillSignal configuration for the logsearch.service to use TERM.

Correct Answer: B

CompTIA Linux+ XK0-005 – Question032

A systems administrator has been tasked with disabling the nginx service from the environment to prevent it from being automatically and manually started. Which of the following commands will accomplish this task?

A.
systemctl cancel nginx
B. systemctl disable nginx
C. systemctl mask nginx
D. systemctl stop nginx

Correct Answer: C

CompTIA Linux+ XK0-005 – Question031

A systems administrator is tasked with preventing logins from accounts other than root, while the file /etc/ nologin exists. Which of the following PAM modules will accomplish this task?

A.
pam_login.so
B. pam_access.so
C. pam_logindef.so
D. pam_nologin.so

Correct Answer: D