Weekend Special 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: save70

XK0-005 CompTIA Exam Lab Questions

Page: 23 / 30
Total 396 questions

CompTIA Linux+ Exam Questions and Answers

Question 89

A security analyst is monitoring the network to identify latency or slowdowns during a vulnerability scan. Which of the following functions will best achieve this?

bash

function x() {

info=$(ping -c 1 $1 | awk -F "/" 'END {print $5}')

echo "$1 | $info"

}

Options:

A.

function x() { info=$(dig $(dig -x $1 | grep ptr | tail -n 1 | awk -F ".in-addr" '{print $1}').origin.asn.cymru.com TXT +short); echo "$1 | $info" }

B.

function x() { info=$(ping -c 1 $1 | awk -F "/" 'END {print $5}'); echo "$1 | $info" }

C.

function x() { info=$(nc -m 40 $1 | awk 'END {print $1}'); echo "$1 | $info" }

D.

function x() { info=$(geoiplookup $1); echo "$1 | $info" }

Question 90

A Linux administrator wants to set the SUID of a file named dev_team.text with 744 access rights. Which of the following commands will achieve this goal?

Options:

A.

chmod 4744 dev_team.txt

B.

chmod 744 --setuid dev_team.txt

C.

chmod -c 744 dev_team.txt

D.

chmod -v 4744 --suid dev_team.txt

Question 91

A user created the following script file:

# ! /bin/bash

# FILENAME: /home/user/ script . sh

echo "hello world"

exit 1

However, when the user tried to run the script file using the command "script . sh, an error returned indicating permission was denied. Which of the follow-ing should the user execute in

order for the script to run properly?

Options:

A.

chmod u+x /home/user/script . sh

B.

chmod 600 /home/user/script . sh

C.

chmod /home/user/script . sh

D.

chmod 0+r /horne/user/script. sh

Question 92

A Linux administrator found many containers in an exited state. Which of the following commands will allow the administrator to clean up the containers in an exited state?

Options:

A.

docker rm --all

B.

docker rm $(docker ps -aq)

C.

docker images prune *

D.

docker rm --state exited

Page: 23 / 30
Total 396 questions