220.127.116.11. Viewing the contents of text files
You can display the contents of a text file using the cat command:
$ cat README
Dia is a program for drawing structured diagrams.
If you accidentally cat a non-text file, your terminal display can get really messed up. The reset command will clear up the situation:
To display only the top or bottom 10 lines of a text file, use the head or tail command instead of cat .
If the text file is too big to fit on the screen, the less command is used to scroll through it.
$ less README
You can use the up and down arrow keys and the Page Up/Page Down keys to scroll, and the q key to quit. Press the h key for help on other options, such as searching.