6.B: Next The tail Command  6: Up Viewing  6: Prev Viewing  Contents

Basic

§ 6.A:  The More and Cat Commands


The more command writes your file onto the screen one page at a time. This means that after each page, it stops and waits for you to tell it what to do (it may also print the name of the file and the percent of the file it has read through, or maybe the prompt more).

Pressing the [space] bar brings up another page, and so on till you reach the file's end. To scroll through the file one line at a time, press the [return] or [enter] key in place of the [space] bar. To quit before reaching the end of the file, press the q key.

To see more in action, try:

One useful application of the more command is to regulate the output of some command which otherwise would zip by you before you get a chance to read it. To do this, you use a "pipe" | which pipes the output of one command into the input of another.

For example, here we list all the files in a large directory with the output of the ls command being piped (|) to more:

Depending on your system, more may take many options. You can learn about them by using the on-line Unix manual: The Edinburgh Web tutorials " UNIXhelp for Users" may also be useful.

If the file is very short you may wish to use the cat command instead. To see cat in action try

The cat command is actually a very powerful and versatile utility