Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 4 out of 34 pages
Exam (elaborations)

Red Hat System Administration II Exam Questions And Answers 100% Verified And Updated.

Document preview thumbnail
Preview 4 out of 34 pages

Red Hat System Administration II Exam Questions And Answers 100% Verified And Updated. The GUID Partition Table (GPT) partitioning scheme # GPT partitioning offers additional features and benefits over MBR. A GPT uses a globally unique identifier (GUID) to identify each disk and partition. A GPT makes the partition table redundant, with the primary GPT at the head of the disk, and a backup secondary GPT at the end of the disk. A GPT uses a checksum to detect errors in the GPT header and partition table. - AnswerThe Master Boot Record (MBR) partitioning scheme is the standard on systems that run BIOS firmware. This scheme supports a maximum of four primary partitions. On Linux systems, with extended and logical partitions, you can create up to 15 partitions. With a 32-bit partition size, disks that are partitioned with MBR can have a size of up to 2 TiB. The 2 TiB disk and partition size limit is now a common and restrictive limitation. Consequently, the legacy MBR scheme is superseded by ____________. It is the standard for disk partitioning and addresses the limitations of the MBR scheme, provideing a maximum of 128 partitions. The scheme allocates 64 bits for logical block addresses, to support partitions and disks of up to eight zebibytes (ZiB) or eight billion tebibytes (TiB). Bash shell script - AnswerAn executable file that contains a list of commands, possibly with programming logic to control decision-making in an overall task. the #! notation # This notation is an interpreter directive that indicates the command interpreter and optional command options that are needed to process the remaining lines of the file. For normal Bash syntax script files, the first line is this directive: #!/usr/bin/bash - AnswerThe first line of a Bash shell script begins with ____________. A shell script file must have execute permissions to run it as an ordinary command. Use the chmod command to modify the file permissions. Use the chown command, if needed, to grant execute permission only for specific users or groups. If the script is stored in a directory that is listed in the shell's PATH environmental variable, then you can run the shell script by using only its file name, similar to running compiled commands. If a script is not in a PATH directory, run the script using its absolute path name, which can be determined by querying the file with the which command. Alternatively, run a script in your current working directory using the . directory prefix, such as ./scriptname. globbing (file name pattern matching) and shell expansion; ©FYNDLAY 2024/2025 ALL RIGHTS RESERVED. 2 | P a g e command and variable substitution # Variable substitution is conceptually identical to command substitution, but might use optional brace syntax. - AnswerUse double quotation marks to suppress ____________, but still allow ____________. for VARIABLE in LIST; do COMMAND VARIABLE done # The variable name is arbitrary. Typically, you reference the variable value with commands in the command block. Provide the list of strings for the for loop from a list that the user enters directly, or that is generated from shell expansion, such as variable, brace, or file name expansion, or command substitution. #ex: for HOST in host1 host2 host3; do echo $HOST; done - AnswerBash for-loop syntax exit # Use the exit command with an optional integer argument between 0 and 255, which represents an exit code. An exit code is returned to a parent process to indicate the status at exit. An exit code value of 0 represents a successful script completion with no errors. All other nonzero values indicate an error exit code. The script programmer defines these codes. Use unique values to represent the different error conditions that are encountered. Retrieve the exit code of the last completed command from the built-in $? variable. When a script's exit command is used without an exit code argument, then the script returns the exit code of the last command that was run within the script. - AnswerAfter a script interprets and processes all of its content, the script process exits and passes control back to the parent process that called it. However, a script can be exited before it finishes, such as when the script encounters an error condition. Use the ____________ command to immediately leave the script, and skip processing the remainder of the script. test # Perform tests by using various operators to determine whether a number is greater than (gt), greater than or equal to (ge), less than (lt), less than or equal to (le), or equal (eq) to another number. Use operators to test whether a string of text is the same (= or ==) or not the same (!=) as another string of text, or whether the string has zero length (z) or has a non-zero length (n). You can also test if a regular file (-f) or directory (-d) exists and some special attributes, such as if the file is a symbolic link (-L) or if the user has read permissions (-r); [ TESTEXPRESSION ] or the newer extended test command syntax, [[ TESTEXPRESSION ]] # In most cases you should use the [[ ]] syntax. - AnswerTo ensure that unexpected conditions do not easily disrupt scripts, it is recommended to verify command input such as command-line arguments, user input, command substitutions, variable expansions, and file name expansions. You can check integrity in your scripts by using the Bash ____________ command. All commands produce an exit code on completion. To see the exit status, view the $? variable immediately following the execution of the command. An exit status of 0 indicates a successful exit with nothing to report, and nonzero values indicate ©FYNDLAY 2024/2025 ALL RIGHTS RESERVED. 3 | P a g e some condition or failure. Alternatively, perform tests by using the Bash command syntax, ____________, which provides features such as file name globbing and regex pattern matching. if CONDITION; then STATEMENT ... STATEMENT fi - AnswerThe if/then syntax if CONDITION; then STATEMENT ... STATEMENT else STATEMENT ... STATEMENT fi - AnswerThe if/then/else syntax if CONDITION; then STATEMENT ... STATEMENT elif CONDITION; then STATEMENT ... STATEMENT else STATEMENT ... STATEMENT fi - AnswerExpand an if/then/elif/else

Content preview

©FYNDLAY 2024/2025 ALL RIGHTS RESERVED.



Red Hat System Administration II Exam
Questions And Answers 100% Verified And
Updated.



The GUID Partition Table (GPT) partitioning scheme # GPT partitioning offers additional
features and benefits over MBR. A GPT uses a globally unique identifier (GUID) to identify
each disk and partition. A GPT makes the partition table redundant, with the primary GPT at the
head of the disk, and a backup secondary GPT at the end of the disk. A GPT uses a checksum to
detect errors in the GPT header and partition table. - Answer✔The Master Boot Record (MBR)
partitioning scheme is the standard on systems that run BIOS firmware. This scheme supports a
maximum of four primary partitions. On Linux systems, with extended and logical partitions,
you can create up to 15 partitions. With a 32-bit partition size, disks that are partitioned with
MBR can have a size of up to 2 TiB. The 2 TiB disk and partition size limit is now a common
and restrictive limitation. Consequently, the legacy MBR scheme is superseded by
____________. It is the standard for disk partitioning and addresses the limitations of the MBR
scheme, provideing a maximum of 128 partitions. The scheme allocates 64 bits for logical block
addresses, to support partitions and disks of up to eight zebibytes (ZiB) or eight billion tebibytes
(TiB).
Bash shell script - Answer✔An executable file that contains a list of commands, possibly with
programming logic to control decision-making in an overall task.
the #! notation # This notation is an interpreter directive that indicates the command interpreter
and optional command options that are needed to process the remaining lines of the file. For
normal Bash syntax script files, the first line is this directive: #!/usr/bin/bash - Answer✔The first
line of a Bash shell script begins with ____________. A shell script file must have execute
permissions to run it as an ordinary command. Use the chmod command to modify the file
permissions. Use the chown command, if needed, to grant execute permission only for specific
users or groups. If the script is stored in a directory that is listed in the shell's PATH
environmental variable, then you can run the shell script by using only its file name, similar to
running compiled commands. If a script is not in a PATH directory, run the script using its
absolute path name, which can be determined by querying the file with the which command.
Alternatively, run a script in your current working directory using the . directory prefix, such as
./scriptname.
globbing (file name pattern matching) and shell expansion;



1|Page

, ©FYNDLAY 2024/2025 ALL RIGHTS RESERVED.

command and variable substitution # Variable substitution is conceptually identical to command
substitution, but might use optional brace syntax. - Answer✔Use double quotation marks to
suppress ____________, but still allow ____________.
for VARIABLE in LIST; do
COMMAND VARIABLE
done
# The variable name is arbitrary. Typically, you reference the variable value with commands in
the command block. Provide the list of strings for the for loop from a list that the user enters
directly, or that is generated from shell expansion, such as variable, brace, or file name
expansion, or command substitution.


#ex: for HOST in host1 host2 host3; do echo $HOST; done - Answer✔Bash for-loop syntax
exit # Use the exit command with an optional integer argument between 0 and 255, which
represents an exit code. An exit code is returned to a parent process to indicate the status at exit.
An exit code value of 0 represents a successful script completion with no errors. All other
nonzero values indicate an error exit code. The script programmer defines these codes. Use
unique values to represent the different error conditions that are encountered. Retrieve the exit
code of the last completed command from the built-in $? variable. When a script's exit command
is used without an exit code argument, then the script returns the exit code of the last command
that was run within the script. - Answer✔After a script interprets and processes all of its content,
the script process exits and passes control back to the parent process that called it. However, a
script can be exited before it finishes, such as when the script encounters an error condition. Use
the ____________ command to immediately leave the script, and skip processing the remainder
of the script.
test # Perform tests by using various operators to determine whether a number is greater than
(gt), greater than or equal to (ge), less than (lt), less than or equal to (le), or equal (eq) to another
number.
Use operators to test whether a string of text is the same (= or ==) or not the same (!=) as another
string of text, or whether the string has zero length (z) or has a non-zero length (n). You can also
test if a regular file (-f) or directory (-d) exists and some special attributes, such as if the file is a
symbolic link (-L) or if the user has read permissions (-r);
[ <TESTEXPRESSION> ] or the newer extended test command syntax, [[
<TESTEXPRESSION> ]] # In most cases you should use the [[ ]] syntax. - Answer✔To ensure
that unexpected conditions do not easily disrupt scripts, it is recommended to verify command
input such as command-line arguments, user input, command substitutions, variable expansions,
and file name expansions. You can check integrity in your scripts by using the Bash
____________ command. All commands produce an exit code on completion.
To see the exit status, view the $? variable immediately following the execution of the command.
An exit status of 0 indicates a successful exit with nothing to report, and nonzero values indicate

2|Page

, ©FYNDLAY 2024/2025 ALL RIGHTS RESERVED.

some condition or failure. Alternatively, perform tests by using the Bash command syntax,
____________, which provides features such as file name globbing and regex pattern matching.
if <CONDITION>; then
<STATEMENT>
...
<STATEMENT>
fi - Answer✔The if/then syntax
if <CONDITION>; then
<STATEMENT>
...
<STATEMENT>
else
<STATEMENT>
...
<STATEMENT>
fi - Answer✔The if/then/else syntax
if <CONDITION>; then
<STATEMENT>
...
<STATEMENT>
elif <CONDITION>; then
<STATEMENT>
...
<STATEMENT>
else
<STATEMENT>
...
<STATEMENT>
fi - Answer✔Expand an if/then/elif/else syntax
-E;

3|Page

, ©FYNDLAY 2024/2025 ALL RIGHTS RESERVED.

-E - Answer✔There are two types of regular expressions: basic regular expressions and extended
regular expressions.
One difference between basic and extended regular expressions is in the behavior of the |, +, ?, (,
), {, and } special characters. In basic regular expression syntax, these characters do not have
special meaning unless prefixed with a backslash \ character. In extended regular expression
syntax, these characters are special unless they are prefixed with backslash \ character. There are
also other minor differences in how the ^, $, and * characters are handled.
The grep, sed, and vim commands use basic regular expressions. The grep command
____________ option, sed command ____________ option, and less commands use extended
regular expressions.
-i;
-v;
-r;
-A NUMBER;
-B NUMBER;
-e;
-E - Answer✔The grep command has many useful options for controlling how it parses lines.
Use the provided regular expression but do not enforce case sensitivity (run case-insensitive)
with the ____________ option. Display only lines that do not contain matches to the regular
expression with the ____________ option. Search for data that matches the regular expression
recursively in a group of files or directories with the ____________ option. Display NUMBER
of lines after the regular expression match with the ____________ option. Display NUMBER of
lines before the regular expression match with the ____________ option. Multiple regular
expressions can be supplied and are used with a logical OR using the ____________ option. Use
extended regular expression syntax instead of basic regular expression syntax when parsing the
provided regular expression with the ____________ option.
grep -v '^[#;]' file_name - Answer✔CLI: Exclude all the lines that begin with a hash character
(#) or a semicolon (;) character in a search on a file
at TIMESPEC # # The at package provides the atd system daemon, and the at and atq commands
to interact with the daemon. Any user can queue jobs for the atd daemon by using the at
command. The atd daemon provides 26 queues, identified from a to z, with jobs in alphabetically
later queues getting lower system priority;
at now +5min < myscript;
atq or the at -l;
at -c JOBNUMBER;
atrm JOBNUMBER - Answer✔Use the ____________ command to start entering a new job to
schedule. The command then reads from STDIN (your keyboard) to obtain the commands to run.

4|Page

Document information

Uploaded on
January 24, 2025
Number of pages
34
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$11.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Fyndlay
3.6
(76)
Sold
422
Followers
81
Items
20241
Last sold
2 days ago


Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions