Chapter 5 Quizzes

docx

School

Kennesaw State University *

*We aren’t endorsed by this school

Course

2742

Subject

Computer Science

Date

Dec 6, 2023

Type

docx

Pages

1

Uploaded by kirahmartin

Report
Chapter 5 Quizzes Section 5.2 Quiz: Redirect Output to a File or Program Choose the correct answer to the following questions: [s[[I[]]]]]6] INNNED sl 11} 9| ol TTTI]T[]n| ENECINEENNEENNECNERENNENE] 1. Which output redirection operator displays output to a terminal and discards all error messages? A &> file B 2> &> file C | 2> /dev/null D 1> /dev/null (=) e 2. Which output redirection operator sends output to a file and sends errors to a different file? A > file 2> file2 B > file 1> file2 [ > file 82> file2 D | tee file 3. Which output redirection operator sends both output and errors to a file, and creates it or overwrites its contents? A | tee file B 28> file C 18> file D &> file 4. Which output redirection operator sends output and errors to the same file and preserves the file content if it exists? A > file 2> file2 B &> file C | >> file 2>&1 D >> file 1>&1 = 5. Which output redirection operator discards all messages that are normally sent to the terminal? A > file 2> file2 B &> /dev/null C &> /dev/null 2> file D &> file 6. Which output redirection operator sends output to both the screen and a file at the same time? A &> /dev/null B > file 2> file2 [ | | tee file D | < file 7. Which output redirection operator saves output to a file and discards all error messages? A &> file B | tee file 2> /dev/null C > file 1> /dev/null > file 2> /dev/null &= = o
Discover more documents: Sign up today!
Unlock a world of knowledge! Explore tailored content for a richer learning experience. Here's what you'll get:
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help