Chapter 5. Viewing Files

One of the great things about most Linux boxes is that virtually all important system configurations, logs, and information files are in ASCII text format. Because ASCII is a well-supported, ancient (in computer terms) standard, there’s a wealth of software commands you can use to view the contents of those text files. This chapter looks at four commands you’ll use constantly when reading ASCII text files.

View Files on stdout

cat

DOS users have the type command that displays the contents of text files on a screen. Linux users can use cat, which does the same thing. Want to view a file in the shell? Try cat.

$ cat Hopkins_-_The_Windhover.txt I caught this morning morning's minion, kingdom of daylight's dauphin, dapple-dawn-drawn ...

Get Linux: Phrasebook 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.