Showing What's in a File
Contents:
Cracking the Nut
Four Ways to Skin a cat
Using more to Page Through Files
The "less" Pager: More than "more"
Page Through Compressed, RCS, Unprintable Files
What's in That White Space?
Show Non-Printing Characters with cat -v or od -c
Finding File Types
Adding and Deleting White Space
Squash Extra Blank Lines
crush: A cat that Skips all Blank Lines
Double Space, Triple Space ...
pushin: Squeeze Out Extra White Space
How to Look at the End of a File: tail
Finer Control on tail
How to Look at a File as It Grows
An Alias in Case You Don't Have tail
Watching Several Files Grow
Reverse Lines in Long Files with flip
Printing the Top of a File
Numbering Lines
Cracking the Nut
This chapter talks about the many ways of dumping a file to the screen. Most users know the brute force approach provided by cat (), but there's more to it than that:
- Pagers like more () and less (25.4) that give you more control when looking through long files.
- Looking at files that are compressed or otherwise unviewable (article ).
- Finding out what type of data a file contains before opening it (article ).
- Adding and deleting blank lines or other white space before displaying a file (articles through ).
- Looking at just the beginning or just the end of a file (articles through ).
- Numbering lines (article ).
- TOR