Ch10 Standard Text Streams and Redirection Exam

  1. If you want to append content to a file with the normal output of a command, you can use:

    • >
    • >>
    • 1>
    • 2>>
  2. If you want to overwrite a file by redirecting the output of a command, you can use:

    • }
    • >
    • |
    • &
  3. Many commands that read text files will also read from this stream:

    • stdcon
    • stderr
    • stdout
    • stdin
  4. This stream is the output of a command operating normally:

    • stderr
    • stdout
    • stdin
    • stdnorm
  5. To redirect the errors that are output by a command, you can use:

    • 2&
    • 2
    • 2>
    • 2@
  6. To send the normal and error output of a command to a single file, you can use:

    • 2>
    • >
    • 2>&1
    • 1>&
  7. Two or more commands combined with the vertical bar | character between them form a:

    • streamline
    • command line
    • pipeline
    • outputline
  8. 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
  9. 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
  10. Which two symbols can effectively send stdin to a command?

    (choose two)

    • >
    • !
    • <
    • |
  11. 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
  12. In a command pipeline, the output of one command is sent to another command as output.

    True or False?

    • True
    • False
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments