2.9.8. Viewing Contents of Text Files

Linux for Programmers and Users, Section 3.15

2.9.8.1. Viewing Complete Files

cat [options][file-list]

See also

Creating a File

2.9.8.2. Viewing files One Page at a Time

2.9.8.2.1. more

more

View file contents one page at a time. Use space bar to advance; b key to go backwards. Advance passed the end of a file or type q to exit.

SYNOPSIS

more file

2.9.8.2.2. less

less

A newer, alternatire to more to view file contents one page at a time. Use space bar or f to advance; b key to go backwards. Searching within a file is much like vi (/ or ?) Use q to exit.

SYNOPSIS

less file

2.9.8.3. Viewing the Head or Tail of a File

2.9.8.3.2. tail

tail

Output the last part of files

SYNOPSIS

tail [option] [file-list]
-n, --lines=N

print the last N lines instead of the last 10

-f

output appended data as the file grows