A few different ways of listing the contents of a text file are discussed below.
- cat <filename> This will cause the text of the file to scroll off
the screen if the text occupies more than one screen of lines. The command cat can also
be used to concatenate multiple files. For example, cat <file1> <file2> will concatenate
the two files and then display on the terminal.
- more <filename> This will display the file one screenful at a time;
press the space bar to advance to the next screen; press RETURN to scroll up one line;
and q to quit.
- less <filename> The command less is similar to the commandmore. However less allows you to move backwards in a file using the up/down arrow keys
or the PageUp and PageDown keys. The command less is also faster than more
on large files. (less is more, a cliche or not?)
- Use a text editor. For example: kwrite, vim, emacs etc.