CompTIA XK0-005 - CompTIA Linux+ Exam
Page: 2 / 89
Total 442 questions
Question #6 (Topic: Exam A)
A user is asking the systems administrator for assistance with writing a script to verify whether a file exists. Given the following:

Which of the following commands should replace the <CONDITIONAL> string?

Which of the following commands should replace the <CONDITIONAL> string?
A. if [ -f "$filename" ]; then
B. if [ -d "$filename" ]; then
C. if [ -f "$filename" ] then
D. if [ -f "$filename" ]; while
Answer: A
Question #7 (Topic: Exam A)
DRAG DROP
As a Systems Administrator, to reduce disk space, you were tasked to create a shell script that does the following:
Add relevant content to /tmp/script.sh, so that it finds and compresses related files in /var/log without recursion.
INSTRUCTIONS:
Drag and drop snippets to fill the blanks to build a script that performs the actual compression of rotated log files.
If at any time you would like to bring back the initial state of the simulation, please click the Reset All button.
As a Systems Administrator, to reduce disk space, you were tasked to create a shell script that does the following:
Add relevant content to /tmp/script.sh, so that it finds and compresses related files in /var/log without recursion.
INSTRUCTIONS:
Drag and drop snippets to fill the blanks to build a script that performs the actual compression of rotated log files.
If at any time you would like to bring back the initial state of the simulation, please click the Reset All button.

Answer:

Question #8 (Topic: Exam A)
A systems administrator is deploying three identical, cloud-based servers. The administrator is using the following code to complete the task:

Which of the following technologies is the administrator using?

Which of the following technologies is the administrator using?
A. Ansible
B. Puppet
C. Chef
D. Terraform
Answer: D
Question #9 (Topic: Exam A)
Which of the following technologies can be used as a central repository of Linux users and groups?
A. LDAP
B. MFA
C. SSO
D. PAM
Answer: A
Question #10 (Topic: Exam A)
A systems administrator is troubleshooting connectivity issues and trying to find out why a Linux server is not able to reach other servers on the same subnet it is connected to. When listing link parameters, the following is presented:

Based on the output above, which of following is the MOST probable cause of the issue?

Based on the output above, which of following is the MOST probable cause of the issue?
A. The address ac:00:11:22:33:cd is not a valid Ethernet address.
B. The Ethernet broadcast address should be ac:00:11:22:33:ff instead.
C. The network interface eth0 is using an old kernel module.
D. The network interface cable is not connected to a switch.
Answer: D