terminal.cab
No.
15
Date
Learning goal
Terminal Start, lesson 5
Level
1 of 3

Command of the day No. 15: tail -n

Purpose: Shows only the last lines of a file.

Syntax: tail -n number file

Example:

tail -n 2 logs/app.log
WARN slow response
ERROR payment failed

Output from the simulator, as on a real Linux.

Options:

Try it in the terminal Share image

Fills in the command. Nothing runs until you press Enter.

Command of the day No. 15: tail -n. Purpose: Shows only the last lines of a file. Example: tail -n 2 logs/app.log. Remember: New log entries land at the bottom, tail shows them first.
The same card as an image, 1080 x 1350 pixels.

Today's card ยท All cards so far