A log file is the most common thing you will be handed. Reading all of it is rarely the right move, so the useful skill is asking for the part you want.
Each one is marked as you go, and the explanation arrives straight after, which is
the part worth reading.
4 questions, marked as you go.
Tasks
These need your own device. Run the command in Termux, then paste what it printed.
The marking looks at what the output means, so spacing, version numbers and
ordering do not matter. If you have not installed anything yet, the
lesson covers the setup.
Find only the errors
This writes a small log file and then searches it, showing the line numbers of the matches rather than the whole file.
Run this in Termux
On your own device. Nothing on this page executes it. The command runs in
your terminal, and this box only reads what you paste back.
You should get two lines, and neither of them should be an INFO line.
the first match is reported with its line number
the second match is reported with its line number
no non-matching lines came through
What a good answer looks like
Two lines, each starting with the line number, a colon, then the matching text: 2:ERROR disk full and 4:ERROR timeout. The line numbers are what -n adds, and they matter because they let you go straight to the place in the file. Notice that the INFO lines are absent. A search shows you matches, not the file.
Marking your own work
Both halves of this are checked in your browser, with no server involved, so nothing
stops you from pasting output you did not run. The tasks are written so that the
easiest way to pass one is to actually do it and read the result, which is the whole
intention.