What is true regarding UEFI firmware? (Choose two.)
It can read and interpret partition tables
It can use and read certain file systems
It stores its entire configuration on the /boot/ partition
It is stored in a special area within the GPT metadata
It is loaded from a fixed boot disk position
UEFI firmware is a software program that provides the interface between the hardware and the operating system on a computer. UEFI stands for Unified Extensible Firmware Interface and it is a replacement for the traditional BIOS (Basic Input/Output System). UEFI firmware has several advantages over BIOS, such asfaster boot times, better security, larger disk support, and graphical user interface. Some of the features of UEFI firmware are12:
The other options are false or irrelevant. UEFI firmware does not read and interpret partition tables, it relies on the operating system to do that. UEFI firmware does not store its entire configuration on the /boot/ partition, it stores some of its settings in the NVRAM (Non-Volatile Random Access Memory) on the motherboard and some of its files on the ESP. UEFI firmware is not stored in a special area within the GPT (GUID Partition Table) metadata, it is stored in a ROM chip and an ESP. GPT is a partitioning scheme that supports larger disks and more partitions than the legacy MBR scheme. References:
Given the following input stream:
txt1.txt
atxt.txt
txtB.txt
Which of the following regular expressions turns this input stream into the following output stream?
txt1.bak.txt
atxt.bak.txt
txtB.bak.txt
s/^.txt/.bak/
s/txt/bak.txt/
s/txt$/bak.txt/
s/^txt$/.bak^/
s/[.txt]/.bak$1/
The correct answer is C, s/txt$/bak.txt/. This regular expression will turn the input stream into the desired output stream by using the s command, which is used to substitute or replace a pattern with another pattern. The syntax of the s command is:
s/pattern/replacement/
The pattern is the regular expression that matches the text to be replaced, and the replacement is the text that replaces the matched text. The / symbol is used as a delimiter to separate the pattern and the replacement, but other characters can be used as well.
The pattern in this regular expression is txt$, which means that it will match the string txt at the end of the line. The $ symbol is an anchor that matches the end of the line. The replacement in this regular expression is bak.txt, which means that it will replace the matched string with the string bak.txt.
Therefore, the command s/txt$/bak.txt/ will replace the string txt at the end of each line with the string bak.txt, resulting in the following output stream:
txt1.bak.txt atxt.bak.txt txtB.bak.txt
The other regular expressions are incorrect for the following reasons:
References:
Which wildcards will match the following filenames? (Choose two.)
ttyS0
ttyS1
ttyS2
ttyS[1-5]
tty?[0-5]
tty*2
tty[A-Z][012]
tty[Ss][02]
[character list] matches any one of the characters in the list. ? matches any single character. * matches any number of characters, including none.
Therefore, the wildcard ttyS[1-5] will match any filename that starts with ttyS and ends with a digit from 1 to 5, such as ttyS1, ttyS2, ttyS3, ttyS4, or ttyS5. However, it will not match ttyS0, which has a 0 at the end.
The wildcard tty?[0-5] will match any filename that starts with tty, followed by any single character, followed by a digit from 0 to 5, such as ttyS0, ttyS1, ttyS2, ttyA0, ttyB5, or ttyZ4. This wildcard will match all the given filenames.
The wildcard tty*2 will match any filename that starts with tty and ends with 2, such as ttyS2, ttyA2, ttyB2, or ttyZZZ2. This wildcard will match ttyS2, but not the other two filenames.
The wildcard tty[A-Z][012] will match any filename that starts with tty, followed by a capital letter from A to Z, followed by a digit from 0 to 2, such as ttyA0, ttyB1, ttyC2, ttyZ0, or ttyZ2. This wildcard will match ttyS0 and ttyS2, but not ttyS1, which has a 1 at the end.
The wildcard tty[Ss][02] will match any filename that starts with tty, followed by either S or s, followed by either 0 or 2, such as ttyS0, ttyS2, ttys0, or ttys2. This wildcard will match ttyS0 and ttyS2, but not ttyS1, which has a 1 at the end.
Which of the following commands changes all CR-LF line breaks in the text file userlist.txt to Linux standard LF line breaks and stores the result in newlist.txt?
tr –d ‘\r’ < userlist.txt > newlist.txt
tr –c ‘\n\r’ ‘’
tr ‘\r\n’ ‘’
tr ‘\r’ ‘\n’ userlist.txt newlist.txt
tr –s ‘/^M/^J/’ userlist.txt newlist.txt
The correct answer is A, tr -d ‘\r’ < userlist.txt > newlist.txt. This command will use the tr utility to delete the carriage return characters (\r) from the userlist.txt file and redirect the output to the newlist.txt file. The tr utility is used to translate, delete, or squeeze characters from the standard input and write the result to the standard output. The syntax of the tr command is:
tr [options] set1 [set2]
The options can modify the behavior of the tr command, such as complementing, squeezing, or truncating the sets of characters. The set1 and set2 are strings of characters that specify the translation to be performed. The characters in set1 are replaced by the corresponding characters in set2. If set2 is omitted, the characters in set1 are deleted.
The -d option tells tr to delete the characters in set1 from the output. The \r character is a special escape sequence that represents the carriage return character, which is used in Windows systems to mark the end of a line, along with the line feed character (\n). The < and > symbols are redirection operators that redirect the input and output of a command to a file or device. The < symbol redirects the standard input of a command from a file, while the > symbol redirects the standard output of a command to a file, overwriting any existing content.
Therefore, the command tr -d ‘\r’ < userlist.txt > newlist.txt will read each character from the userlist.txt file, delete any carriage return characters, and write the output to the newlist.txt file. This will effectively change all CR-LF line breaks (\r\n) in the userlist.txt file to Linux standard LF line breaks (\n) and store the result in newlist.txt.
The other commands are incorrect for the following reasons:
References:
Copyright © 2021-2024 CertsTopics. All Rights Reserved