Midterm

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Given: You are the consultant1 user on a Linux system in the /home/consultant1/reports directory.Which command will copy the /home/consultant1/reports/manage-files.txt file to /home/consultant1/reports/manage-files-copy.txt and preserve the date-time stamp of the source file?

cp -p manage-files.txt manage-files-copy.txt

Given: You are the consultant1 user on a Linux system in the consultant1 home directory.Which command will capture the first seven lines of the /home/consultant1/bin/manage-files file and append it to the /home/consultant1/reports/manage-files.txt file?

head -7 bin/manage-files >> reports/manage-files.txt

Which command will display the idle block device containing an XFS file system?

lsblk -fs

Which command is used to export the public encryption key from one server to another?

ssh-copy-id

Which command is used to create SSH keys?

ssh-keygen

Which command creates a new user named itChair that uses the group departmentChairs as one of its secondary groups?

useradd -G departmentChairs itChair

Which command allows us to see the real-time system status?

top

Given: You are the consultant1 user on a Linux system in the consultant1 home directory.Which of the following commands will create three empty files in the /home/consultant1/reports directory named report1, report2, and report3?

touch reports/report{1,2,3}

Which entry below in the /etc/hosts file sets client-review4 as the canonical host name for the IPv4 address 172.25.250.10 of the host servera.lab.example.com?

172.25.250.10 servera.lab.example.com servera client-review4

When using the vim editor, what key sequence will exit out of the vim editor and not save changes to the file?

Esc :q! Enter

When using the vim editor, what key sequence will save changes to the file and exit out of the vim editor?

Esc :wq Enter

In the /etc/ssh/sshd_config file, what key-value pair is used to prevent users from logging in as root with SSH?

PermitRootLogin no

Which command sets the maximum age of the password of itProgrammer to 45 days?

chage -M 45 itProgrammer

Which command forces itChair to change its password on first login?

chage -d 0 itChair

Which command sets the minimum age of the password of itProgrammer to 20 days?

chage -m 20 itProgrammer

Which command will give read, write and execute permissions on /tmp/sandbox.sh to all users?

chmod 777 /tmp/sandbox.sh

Given: There is a new directory called /home/db1/scripts/pythonWhich command will set db1 and dbas as the owning user and group respectively?

chown db1:dbas /home/db1/scripts/python

Which command reports file system disk space usage?

df

Which command will locate all *.conf files on the entire file system, redirect any file names found to conf_files.txt and redirect any error messages to find_error.txt?

find / -name '*.conf' > conf_files.txt 2>find_error.txt

Which command will locate all files having developer1 and developer as the owning user and group, respectively. The files must also have the octal permissions of 640. Record the absolute paths to all of these files in the /tmp/developer.txt text file. Don't display or record any error messages.

find / -user developer1 -group developer -perm 640 > /tmp/developer.txt 2>/dev/null

Which command creates a new group named departmentChairs with GID 12345?

groupadd -g 12345 departmentChairs

Given: /etc/rsyslog.d/grading-debug.conf has been configured to log all messages it receives that have the priority level of debug or higher to the file /var/log/grading-debug and the rsyslog service has been restarted.Which command will generate the log message "program start" having the debug priority?

logger -p debug "program start"

Given: You are the developer1 user on a Linux system in the /home/developer1 directory.Which command will create a soft link named /home/developer1/softlink to the file /home/developer1/reports/report1?

ln -s reports/report1 softlink

Given: You are the developer1 user on a Linux system in the /home/developer1 directory.Which command will create a hard link named /home/developer1/hardlink to the file /home/developer1/reports/report1?

ln reports/report1 hardlink

Given: You are the consultant1 user on a Linux system in the consultant1 home directory.Which of the following commands will create a new directory called /home/consultant1/reports?

mkdir reports

Which command will provide the name of the Ethernet interface?

nmcli device status

Which command will remotely transfer the archive file /tmp/kerberos.tar to the directory /tmp on serverb? Specify /home/dba1/.ssh/review3_key as the private key of the SSH key pair?

scp -i .ssh/review3_key /tmp/kerberos.tar dba1@serverb:/tmp

Which command will mount the vdb2 block device on the /db2-disk directory as the superuser?

sudo mount /dev/vdb2 /db2-disk

Given: A new connection named wireless1 has been created.Which command will activate this new connection?

sudo nmcli connection up wireless1

Which command creates an archive named /tmp/kerberos.tar as the superuser containing the contents of /var/kerberos?

sudo tar -cvf /tmp/kerberos.tar /var/kerberos

Which command will set the timezone to America/Chicago?

sudo timedatectl set-timezone America/Chicago

Which command will install the cups package that supports printing?

sudo yum install cups

Which command will uninstall the cups package that supports printing?

sudo yum remove cups

Which command reloads the sshd service?

systemctl reload sshd.service

Given: You are the consultant1 user on a Linux system in the consultant1 home directory.Which command will write the last three lines of /home/consultant1/bin/manage-files to the file /home/consultant1/reports/manage-files.txt and overwrite any text already in the file /home/consultant1/reports/manage-files.txt.

tail -3 bin/manage-files > reports/manage-files.txt


Set pelajaran terkait

Presidency of John Adams and Thomas Jefferson

View Set

Hinkle Ch. 19: Management of Patients with Chest and Lower Respiratory Tract Disorders

View Set