Viewing Contents of Text Files

Linux for Programmers and Users, Section 3.15

Viewing Complete Files

cat [options][file-list]

See also

Creating a File

Viewing files One Page at a Time

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

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

Viewing the Head or Tail of a File

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

Table Of Contents

Previous topic

Directory Contents (ls)

Next topic

Copying Files

This Page