Reasoning Checkpoint
A design challenge, worked through in writing — no auto-grading, just a real attempt.
The Challenge
Friday afternoon. John gives Anna a challenge with no hints on the screen — just a terminal on the staging server and one question from Samantha: "How many bookings failed today, and what were the five most recent ones?"
Using only the command line, work through it step by step. Write down every command you would type, in order, and what each one does.
What Your Answer Needs
- Connect to the server
stagingas the useranna. - Go to the folder
/var/log/blueticketand confirm you're in the right place. - List the folder's files with their sizes in readable units, including hidden files.
- Count how many lines in
app.logcontainbooking failed. - Show the five most recent
booking failedlines. - Save all
booking failedlines into~/notes/failed-today.txt, creating thenotesfolder first if needed. - Bonus: write the one command that would watch the log live and show only new
booking failedlines.
Stuck? A Few Hints
- Each requirement needs one command, sometimes joined with a pipe.
- The most recent lines are at the end of the file.
>saves output to a file;mkdir -pcreates a folder only if it doesn't exist yet.
Before You Move On
If you wrote something slightly different that does the same job, it's right — there's almost always more than one way in the shell. What matters is the habit: know where you are, ask the file a precise question, and join small commands together. The Linux Fundamentals course builds on exactly this.
