Weekend Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: scxmas70

XK0-005 Exam Dumps - CompTIA Linux+ Exam

Go to page:
Question # 73

A file called testfile has both uppercase and lowercase letters:

$ cat testfile

ABCDEfgH

IJKLmnoPQ

abcdefgH

ijklLMNopq

A Linux administrator is tasked with converting testfile into all uppercase and writing it to a new file with the name uppercase. Which of the following commands will achieve

this task?

A.

tr '(A-Z}' '{a-z}' < testfile > uppercase

B.

echo testfile | tr "[Z-A]" "[z-a]" < testfile > uppercase

C.

cat testfile | tr '{z-a)' '{Z-A}' < testfile > uppercase

D.

tr '[a-z]' '[A-Z]' < testfile > uppercase

Full Access
Question # 74

A systems administrator changed the file permissions on the myfile file:

-rwxrwxr-x 1 admin editors ... myfile

Then the administrator added an existing user test to the editors group:

sudo usermod -a -G editors test

However, the user test is still unable to edit the file. Which of the following solutions will fix this issue?

A.

The user "test" needs to log out and log back in before editing the myfile file.

B.

The file is only writable by the root user, and the user "test" needs root permissions.

C.

The group for the user "test" needs to be reloaded by running sudo source /etc/group.

D.

In order to edit the file, additional permissions are required that the user "test" does not have.

Full Access
Question # 75

A Linux administrator is configuring network traffic forwarding. Despite having proper iptables rules, the traffic forwarding is not working. Which of the following commands will allow Linux to pass network traffic between different interfaces?

A.

nmcli allow-forwarding eth0

B.

echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf; sysctl -p

C.

ip route forward allow --all-interfaces; systemctl restart network

D.

modprobe ip_forward

Full Access
Question # 76

A Linux systems administrator needs to add additional code to code that resides within a repository without changing the original code. Once completed, the additional code will be merged into the main branch. Which of the following commands should the administrator use first?

A.

git push

B.

git rebase

C.

git tag

D.

git clone

Full Access
Question # 77

A Linux administrator needs to remove all local firewall rules on a Linux system. Which of the following commands should the administrator run?

A.

iptables -D

B.

iptables -L

C.

iptables -F

D.

iptables -A

Full Access
Question # 78

An administrator needs to get network information from a group of statically assigned workstations before they are reconnected to the network. Which of the following should the administrator use to obtain this information?

A.

ip show

B.

ifcfg —a

C.

ifcfg —s

D.

i fname —s

Full Access
Question # 79

A Linux administrator is troubleshooting an SSHD issue on a server. Users are receiving error messages stating the connection is refused. Which of the following commands should be used to verify whether the service is listening?

A.

nslookup

B.

route

C.

netstat

D.

ifconfig

Full Access
Question # 80

A systems administrator wants to leverage their password-protected SSH key to connect to multiple servers without entering their password every time. Which of the following commands should the administrator use?

A.

ssh-copy-id

B.

ssh-agent

C.

ssh-add

D.

ssh-keygen

Full Access
Go to page: