CompTIA Linux+ XK0-005 – Question069

Due to low disk space, a Linux administrator finding and removing all log files that were modified more than 180 days ago. Which of the following commands will accomplish this task?

A.
find /var/log -type d -mtime +180 -print -exec rm {} ;
B. find /var/log -type f -modified +180 -rm
C. find /var/log -type f -mtime +180 -exec rm {}
D. find /var/log -type c -atime +180 remove

Correct Answer: A

CompTIA Linux+ XK0-005 – Question068

A Linux systems administrator needs to persistently enable IPv4 forwarding in one of the Linux systems. Which of the following commands can be used together to accomplish this task? (Choose two.)

A.
sysctl net.ipv4.ip_forward
B. sysctl -w net.ipv4.ip_forward=1
C. echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
D. echo 1 > /proc/sys/net/ipv4/ip_forward
E. sysctl p
F. echo "net.ipv6.conf.all.forwarding=l" >> /etc/sysctl.conf

Correct Answer: BC

CompTIA Linux+ XK0-005 – Question067

A Linux administrator created the directory /project/access2all. By creating this directory, the administrator is trying to avoid the deletion or modification of files from non-owners. Which of the following will accomplish this goal?

A.
chmod +t /project/access2all
B. chmod +rws /project/access2all
C. chmod 2770 /project/access2all
D. chmod ugo+rwx /project/access2all

Correct Answer: A

CompTIA Linux+ XK0-005 – Question066

A systems administrator installed a new software program on a Linux server. When the systems administrator tries to run the program, the following message appears on the screen.

Which of the following commands will allow the systems administrator to check whether the system supports virtualization?

A.
dmidecode -s system-version
B. lscpu
C. sysctl -a
D. cat /sys/device/system/cpu/possible

Correct Answer: B

CompTIA Linux+ XK0-005 – Question065

A Linux administrator cloned an existing Linux server and built a new server from that clone. The administrator encountered the following error after booting the cloned server:

The administrator performed the commands listed below to further troubleshoot and mount the missing filesystem:

Which of the following should administrator use to resolve the device mismatch issue and mount the disk?

A.
mount disk by device-id
B. fsck -A
C. mount disk by-label
D. mount disk by-blkid

Correct Answer: D

CompTIA Linux+ XK0-005 – Question064

A junior systems administrator has just generated public and private authentication keys for passwordless login.
Which of the following files will be moved to the remote servers?

A.
id_dsa.pem
B. id_rsa
C. id_ecdsa
D. id_rsa.pub

Correct Answer: D

CompTIA Linux+ XK0-005 – Question063

A systems administrator made some changes in the ~/.bashrc file and added an alias command. When the administrator tried to use the alias command, it did not work. Which of the following should be executed FIRST?

A.
source ~/.bashrc
B. read ~/.bashrc
C. touch ~/.bashrc
D. echo ~/.bashrc

Correct Answer: A

CompTIA Linux+ XK0-005 – Question062

A Linux administrator needs to create a new cloud.cpio archive containing all the files from the current directory. Which of the following commands can help to accomplish this task?

A.
ls | cpio -iv > cloud.epio
B. ls | cpio -iv < cloud.epio
C. ls | cpio -ov > cloud.cpio
D. ls cpio -ov < cloud.cpio

Correct Answer: C

CompTIA Linux+ XK0-005 – Question061

A Linux administrator is trying to remove the ACL from the file /home/user/data. txt but receives the following error message:

Given the following analysis:

Which of the following is causing the error message?

A.
The administrator is not using a highly privileged account.
B. The filesystem is mounted with the wrong options.
C. SELinux file context is denying the ACL changes.
D. File attributes are preventing file modification.

Correct Answer: D