Find the Needle
grep -r, -E, -i, -c across a messy log directory during a live incident.
A beginner Linux challenge worth 3 points. Solve it hands-on in a real Linux environment in your browser - no local setup, no fake shells.
The Challenge
Scenario: 3 AM. PagerDuty woke you up. Users cannot log in. You need to search the logs fast.
Your tasks in /tmp/logs/:
- Find all lines containing ERROR in app.log → save to /tmp/errors.txt
- Count how many WARN lines exist in app.log → write just the number to /tmp/warn_count.txt
- Find all lines mentioning "authentication failed" (case-insensitive) across ALL log files → save to /tmp/auth_failures.txt
Commands to learn: grep, grep -i, grep -r, grep -c, grep -l
Run check when done.