# Knowledge Check: Files and Text --- **1. What's the difference between `>` and `>>`?** *Answer:* `>` overwrites the target file's contents entirely; `>>` appends to the end of it, preserving what was already there. --- **2. A command prints both normal output and an error message. What are these two streams called?** *Answer:* stdout (normal output) and stderr (error messages) — two separate streams that both happen to print to your screen by default. --- **3. You want to watch a log file update live, as new lines are appended, without re-running a command repeatedly.** *Answer:* `tail -f ` — follows the file and prints new lines as they're written. --- **4. `cat app.log | grep ERROR`. What does the `|` actually do?** *Answer:* It pipes `cat`'s output directly into `grep`'s input, so `grep` filters the file's contents without needing a separate temporary file. ## Instructor Notes **Facilitation:** Question 2 is worth a live show-of-hands check — many students haven't consciously registered that stdout/stderr are separate until this module. **Approximate timing:** 5 minutes.