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.
To view file endings with tail:
- At the shell prompt, type tail followed by the file name. As Code Listing 6.5 shows, you'll see the last ten lines on the screen.
tail honeydo
To view a specified number of lines:
- Here, all you do is add a specific number of lines you want to view (-15).
tail -15 honeydo
To view the endings of multiple files:
- Pipe the tail command and the files (multiple files indicated ...
tail honey* | more
Get Unix: 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.