Viewing File Endings with tail

Occasionally, you might also need to use tail, which displays the last lines of a file. tail is particularly handy for checking footers or for updating information in a footer (see Code Listing 6.5). Just as with head (described in the previous pages), tail offers several options for viewing files.

Code Listing 6.5. tail lets you check out just the end of files.
[ejr@hobbes manipulate]$ tail honeydo
Empty diaper pails
Take garbage out.
—End of today's list—

Buy more garbage bags
Get cleaning supplies at store
Take cat to vet
Fix lawnmower

[ejr@hobbes manipulate]$

To view file endings with tail:

  • tail honeydo

    At the shell prompt, type tail followed by the filename. As Code Listing 6.5 shows, you’ll see the last ...

Get Unix Third Edition: Visual Quickstart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.