Common Automation Tasks Test Bank Answers Chapter.16 - Answer Key + Test Bank | Linux Essentials 1e Rothwell by William Rothwell. DOCX document preview.
Linux Essentials for Cybersecurity (Rothwell/Kinsey)
Chapter 16 Common Automation Tasks
1) Which of the following directories contains programs that will be executed once per week?
A) /etc/cron.week
B) /etc/cron.weekly
C) /etc/week.cron
D) /etc/weekly.cron
2) Which of the following directories contains programs that will be executed once per day?
A) /etc/cron.day
B) /etc/cron.weekday
C) /etc/cron.daily
D) /etc/day.cron
3) Which of the following commands displays a file with a number at the beginning of each line?
A) nl
B) ba
C) ls
D) fi
4) Which of the following commands allows automatic rotation, compression, removal, and mailing of log files?
A) logger
B) file
C) grep
D) logrotate
5) Which of the following indicates that the code line is part of a BASH script?
A) /usr/bin/logger
B) #!/bin/sh
C) EXITVALUE=$?
D) /usr/sbin/logrotate
6) Which section of the man page indicates that the argument to the logrotate command is its configuration file?
A) SYNOPSIS
B) NAME
C) DESCRIPTION
D) EXAMPLES
7) When a command or program finishes execution in a BASH script and the command executed successfully, it will return an exit status value of __________ to the calling program.
A) 2
B) 1
C) 0
D) 3
8) Which of the following lines exits a script with a “success” return value of 0?
A) 0 exit
B) exit zero
C) zero exit
D) exit 0
9) Which of the following commands makes entries in the system log?
A) logger
B) log
C) logrotate
D) grep
10) Which of the following commands is used to filter out comment lines and blank lines?
A) trap
B) touch
C) grep
D) mandb
11) A scripting feature called __________ will execute a file as if the code from that file was embedded within the script.
A) locating
B) sourcing
C) logging
D) finding
12) Which of the following commands optimizes the functionality of the man page when executed automatically on a daily basis?
A) renice
B) mandb
C) touch
D) trap
13) Which of the following Fedora scripts is used to initialize or manually update index database caches?
A) mlocate
B) logrotate
C) man-db.cron (p 278)
D) None of the above
14) Which of the following commands doesn’t search the live filesystem, but rather searches from a database that is generated automatically daily?
A) extract
B) find
C) ionice
D) locate
15) Which of the following statements is true regarding the locate and find commands?
A) The locate command is faster than the find command.
B) The find command searches from a database that is generated automatically daily.
C) The locate command searches the live filesystem.
D) The find command is faster than the locate command.
16) Which of the following commands creates the database that is used by the locate command?
A) renice
B) dbcreate
C) updatedb
D) ionice
17) Which of the following, in coding terms, refers to a location where people share programs?
A) Archive
B) Repository
C) Collection
D) Library
18) Which of the following Fedora scripts is used to generate the database that the locate command uses daily?
A) mlocate
B) logrotate
C) man-db.cron
D) None of the above
19) Which of the following directories contains programs that will be executed once per month?
A) /etc/cron.month
B) /etc/monthly.cron
C) /etc/cron.monthly
D) /etc/month.cron
20) Which of the following directories contains programs that will be executed once per hour?
A) /etc/hour.cron
B) /etc/cron.hourly
C) /etc/cron.hour
D) /etc/hourly.cron
Document Information
Connected Book
Answer Key + Test Bank | Linux Essentials 1e Rothwell
By William Rothwell