Ch10 Standard Text Streams and Redirection Exam
-
If you want to append content to a file with the normal output of a command, you can use:
- >
- >>
- 1>
- 2>>
-
If you want to overwrite a file by redirecting the output of a command, you can use:
- }
- >
- |
- &
-
Many commands that read text files will also read from this stream:
- stdcon
- stderr
- stdout
- stdin
-
This stream is the output of a command operating normally:
- stderr
- stdout
- stdin
- stdnorm
-
To redirect the errors that are output by a command, you can use:
- 2&
- 2
- 2>
- 2@
-
To send the normal and error output of a command to a single file, you can use:
- 2>
- >
- 2>&1
- 1>&
-
Two or more commands combined with the vertical bar
|
character between them form a:- streamline
- command line
- pipeline
- outputline
-
Which of the following commands will take the standard error of the
echo
command cmd1 and put it into the /tmp/output.txt file:echo | /tmp/output.txt
echo > /tmp/output.txt
echo 2> /tmp/output.txt
echo 2 | /tmp/output
-
Which of the following commands will take the standard output of the
echo
command and put it into the /tmp/output.txt file:echo | /tmp/output.txt
echo 2> /tmp/output.txt
echo > /tmp/output.txt
echo 2 | /tmp/output
-
Which two symbols can effectively send stdin to a command?
(choose two)
- >
- !
- <
- |
-
Which command can be used to send the output of a command to both stdout and a file:
ls 2 | /tmp/output
ls | /tmp/output.txt
ls | tee /tmp/output.txt
ls | echo /tmp/output.txt
-
In a command pipeline, the output of one command is sent to another command as output.
True or False?
- True
- False
Subscribe
0 Comments
Newest