Chapter 7. Looking into Files

By this point, you've learned a considerable number of Unix commands and a lot about the operating and file systems. This hour focuses on Unix tools to help you ascertain what types of files you've been seeing in all the different directories. It then introduces five powerful tools for examining the content of files.

Goals for This Hour

In this hour, you will learn how to

  • Use file to identify file types

  • Explore Unix directories with file

  • Peek at the first few lines with head

  • View the last few lines with tail

  • View the contents of files with cat

  • View larger files with more

This hour begins with a tool to help ensure that the files you're about to view are intended for human perusal and then explores many of the commands available ...

Get SAMS Teach Yourself Unix in 24 Hours FOURTH EDITION 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.