tail -n
Show the last N lines of a file
tail -n 50 shows the last 50 lines, the most recent entries in a log file. tail is the first command during an incident to see what the app logged before crashing.
Example
$ tail -n 3 /var/log/app.log
2024-01-15 14:23:47 FATAL Connection pool exhausted
Tip: Type it yourself in the terminal below - reading is not the same as doing.