# Guided Exercise: Which Tool Actually Answers the Question? This is a paper exercise — commit to an answer before checking it in the Lab. ## Your task For each situation, name the ONE command (or short pipeline) you'd reach for first: 1. You want to see just the last 20 lines of a 50,000-line log file. 2. You want to know how many lines in a file contain the word "timeout." 3. You want to watch a log file update live while a process is running. 4. You want to see a file's full contents but it's too long for one screen and you want to scroll through it interactively. ## A worked shape to check yourself against 1. `tail -n 20 file.log` 2. `grep -c timeout file.log` 3. `tail -f file.log` 4. `less file.log` Notice: `cat` would technically "work" for #4 too, but it dumps everything at once with no way to scroll back — `less` is the actual right tool once a file is longer than one screen. ## Instructor Notes **Facilitation:** Item 4 is worth discussing explicitly — "it works" isn't the same bar as "it's the right tool for this situation," and that distinction matters more as commands compose into real troubleshooting workflows. **Approximate timing:** 8-10 minutes live discussion; 5 minutes self-paced.