Viewing File Beginnings with head
Using head, as shown in Code Listing 6.3, you can find out in a jiffy what's in a file by viewing the top few lines. This is particularly handy when you're browsing file listings or trying to find a specific file among several others with similar content.
Code Listing 6.3. Use head to look at just the top of a file, which gives you a manageable view of the file.
To view file beginnings with head:
To view a specified number of lines:
To view the beginnings of multiple files:
Code Listing 6.4. head, with the help of more, lets you see the beginnings of several files in sequence.