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 2 out of 6 pages
Exam (elaborations)

Nos 120 Chapter 7 review UPDATED ACTUAL Exam Questions and CORRECT Answers

Document preview thumbnail
Preview 2 out of 6 pages

Nos 120 Chapter 7 review UPDATED ACTUAL Exam Questions and CORRECT Answers Because stderr and stdout represent the results of a command and stdin represents the input required for a command, only stderr and stdout can be redirected to/from a file. True or False? - CORRECT ANSWER - False The current value for the HOME variable is displayed by which of the following commands? (Choose all that apply.) - CORRECT ANSWER - echo $HOME echo ~

Content preview

Nos 120 Chapter 7 review UPDATED
ACTUAL Exam Questions and CORRECT
Answers
Because stderr and stdout represent the results of a command and stdin represents the input
required for a command, only stderr and stdout can be redirected to/from a file. True or False? -
CORRECT ANSWER - False


The current value for the HOME variable is displayed by which of the following commands?
(Choose all that apply.) - CORRECT ANSWER - echo $HOME
echo ~


What does &> accomplish when entered on the command line after a command? - CORRECT
ANSWER - It redirects both stderr and stdout to the same location


Which of the following will display the message welcome home if the cd /home/user1 command
is successfully executed?
cd /home/user1 && echo "welcome home"
cat "welcome home" || cd /home/user1
cd /home/user1 || cat "welcome home"

echo "welcome home" && cd /home/user1 - CORRECT ANSWER - cd /home/user1 &&
echo "welcome home"


Which of the following lines can be used to perform command substitution within a shell script?
(Choose all that apply.) - CORRECT ANSWER - `command`
$(command)


The sed and awk commands are filter commands commonly used to format data within a pipe.
True or False? - CORRECT ANSWER - True

, Which of the following variables could access the value "/etc" within the sample shell script, if
the sample shell script was executed using the bash sample /var /etc /bin command? - CORRECT
ANSWER - $2


Which of the following files is always executed immediately after any user logs in to a Linux
system and receives a BASH shell? - CORRECT ANSWER - /etc/profile



Every if construct begins with if and must be terminated with? - CORRECT ANSWER - fi


Which of the following operators reverses the meaning of a test statement? - CORRECT
ANSWER -!


What would be the effect of using the alias command to make an alias for the date command
named cat in honor of your favorite pet? - CORRECT ANSWER - When you use the cat
command at the command prompt with the intention of viewing a text file, the date appears
instead.


Before a user-defined variable can be used by processes that run in subshells, that variable must
be __________. - CORRECT ANSWER - exported


You attempt to perform the git commit -m "Added listdir function" but the command fails. What
are possible reasons for the failure? (Choose all that apply.) - CORRECT ANSWER - No
files were added to the Git index beforehand.
The user performing the commit has not set their Git user information.
The user performing the commit is not running the command from within the Git repo directory.


Which construct can be used in a shell script to read stdin and place it in a variable? - CORRECT
ANSWER - read


You have redirected stderr to a file called Errors. You view the contents of this file afterward and
notice that there are six error messages. After repeating the procedure, you notice that there are
only two error messages in this file. Why? - CORRECT ANSWER - You did not append

Document information

Uploaded on
March 26, 2025
Number of pages
6
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$10.49

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.
MGRADES
4.0
(235)
Sold
1538
Followers
108
Items
111318
Last sold
12 hours 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