tail

The command that prints the last lines of its input, ten by default or as many as -n says.

In more detail

tail -f keeps the file open and prints new lines as they are added, which is how people watch a log file grow. tail -n +2 starts from the second line, skipping a header.

Examples

tail -n 2 poem.txt
tail -f app.log
python3 dora_metrics.py fixture | tail -3  # just the instability lines
python3 dora_metrics.py fixture | tail -3

Related terms

Taught in

References