Compare

head vs tail

How to choose between the start and end of a file when inspecting text quickly.

`head` shows the beginning of a file or stream. `tail` shows the end, which often matters more for logs and recent output.

Use head When

You want file headers, top rows, or the first few records.

You are checking structure, format, or initial content quickly.

Use tail When

You care about recent log lines or the latest output.

You want to follow appended content with `-f` in a live workflow.

Rule of Thumb

head starts the story. tail shows the latest part.

Want the short version? Browse the compact sheet views and save the commands you use most into a Cheatbook.