CompTIA XK0-004 - CompTIA Linux+ Exam
Page: 3 / 92
Total 456 questions
Question #11 (Topic: Single Topic)
A systems administrator needs to append output of ls `"lha /opt command to the contents of a test.txt file. Which of the following commands will accomplish
this?
this?
A. ls ג€"lha /opt > test.txt
B. ls ג€"lha /opt < test.txt
C. ls ג€"lha /opt >> test.txt
D. ls ג€"lha /opt << test.txt
Answer: C
Question #12 (Topic: Single Topic)
A Linux administrator needs to remotely update the contents of the www.comptia.org/contacts URL.
Which of the following commands would allow the administrator to download the current contents of the URL before updating?
Which of the following commands would allow the administrator to download the current contents of the URL before updating?
A. curl www.comptia.org/contacts
B. dig www.comptia.org/contacts
C. apt-get www.comptia.org/contacts
D. yum list www.comptia.org/contacts
Answer: A
Question #13 (Topic: Single Topic)
Which of the following BEST describes containers running on a Linux system?
A. Containers only need the namespaces functionality to run on a Linux system available since kernel 2.6.
B. Containers need a hypervisor to run on a Linux system. Cgroups namespaces are functionalities used for the kernel but not for running containers.
C. Containers only need the cgroups functionality for running on a Linux system. Namespaces is not a Linux kernel functionality needed for creating and managing containers.
D. Containers use the cgroups and namespaces functionalities to isolate processes and assign hardware resources to each of those isolated processes.
Answer: D
Question #14 (Topic: Single Topic)
A networked has been crashing intermittently. A Linux administrator would like to write a shell script that will attempt to ping the server and email an alert if the
server fails to respond. The script will later be scheduled via cron job.
Which of the following scripts would BEST accomplish this task?
A.

B.

C.

C.
D.

server fails to respond. The script will later be scheduled via cron job.
Which of the following scripts would BEST accomplish this task?
A.

B.

C.

C.
D.

Answer: D
Question #15 (Topic: Single Topic)
A Linux administrator is testing connectivity to a remote host on a shared terminal. The administrator wants to allow other users to access the terminal while the
command is executing.
Which of the following commands should the administrator use?
command is executing.
Which of the following commands should the administrator use?
A. bg ping remotehost
B. fg ping remotehost
C. ping remotehost < results
D. ping remotehost &
Answer: D