Weekend Sale Special - Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: top65certs

Online XK0-005 Questions Video

Page: 20 / 22
Total 292 questions

CompTIA Linux+ Exam Questions and Answers

Question 77

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 string?

Options:

A.

if [ -f "$filename" ]; then

B.

if [ -d "$filename" ]; then

C.

if [ -f "$filename" ] then

D.

if [ -f "$filename" ]; while

Question 78

A Linux administrator is troubleshooting a systemd mount unit file that is not working correctly. The file contains:

[root@system] # cat mydocs.mount

[Unit]

Description=Mount point for My Documents drive

[Mount]

What=/dev/drv/disk/by-uuid/94afc9b2-ac34-ccff-88ae-297ab3c7ff34

Where=/home/user1/My Documents

Options=defaults

Type=xfs

[Install]

WantedBy=multi-user.target

The administrator verifies the drive UUID correct, and user1 confirms the drive should be mounted as My Documents in the home directory. Which of the following can the administrator

do to fix the issues with mounting the drive? (Select two).

Options:

A.

Rename the mount file to home-user1-My\x20Documents.mount.

B.

Rename the mount file to home-user1-my-documents.mount.

C.

Change the What entry to /dev/drv/disk/by-uuid/94afc9b2\-ac34\-ccff\-88ae\-297ab3c7ff34.

D.

Change the Where entry to Where=/home/user1/my\ documents.

E.

Change the Where entry to Where=/home/user1/My\x20Documents.

F.

Add quotes to the What and Where entries, such as What="/dev/drv/disk/by-uuid/94afc9b2-ac34-ccff-88ae-297ab3c7ff34" and Where="/home/user1/My Documents".

Question 79

A Linux administrator reviews a set of log output files and needs to identify files that contain any occurrence of the word denied. All log files containing entries in uppercase or lowercase letters should be included in the list. Which of the following commands should the administrator use to accomplish this task?

Options:

A.

find . -type f -print | xrags grep -ln denied

B.

find . -type f -print | xrags grep -nv denied

C.

find . -type f -print | xrags grep -wL denied

D.

find . -type f -print | xrags grep -li denied

Question 80

A systems technician is working on deploying several microservices to various RPM-based systems, some of which could run up to two hours. Which of the following commands will allow the technician to execute those services and continue deploying other microservices within the same terminal section?

Options:

A.

gedit & disown

B.

kill 9 %1

C.

fg %1

D.

bg %1 job name

Page: 20 / 22
Total 292 questions