Print the contents of one or more files to the screen.
more file-list less file-list
The more command is similar to cat, but displays its output one screen at a time. The less command is similar, but has significantly more features. These commands are often used with a pipe (|
) to format the output of other Unix commands.
The file-list is one or more pathnames of ordinary files that the command is going to read and print.
When the more command runs, you may:
q
to exitWhen using less, press the j
or k
keys to scroll up and down one line at a time and b
to scroll up a page at a time.
To print a file on screen one screen at a time:
z123456@turing:~$ more prog1.cpp
To format the output from the cat command:
z123456@turing:~$ cat -nvet | more
To be able to scroll back and forth through a long list of files:
z123456@turing:~$ ls -al | less