Command Line Checkpoint

Find Today's Failed Bookings

Reasoning Checkpoint

A design challenge, worked through in writing — no auto-grading, just a real attempt.

15–20 min

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 staging as the user anna.
  • Go to the folder /var/log/blueticket and 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.log contain booking failed.
  • Show the five most recent booking failed lines.
  • Save all booking failed lines into ~/notes/failed-today.txt, creating the notes folder first if needed.
  • Bonus: write the one command that would watch the log live and show only new booking failed lines.
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 -p creates 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.

Next