less (display file one page at a time)

Displays a file to the screen. It displays one screen, and then waits. The less command is a newer version of the more command. less has both options and commands. Commands are typed while less is running, displaying the file. Commands are similar to vi commands. Pressing a key when less has displayed a screen full of text and is waiting for input tells less what to display next.

Format:    less filename
Examples:  less file1.txt

The less command has many more commands and options than the more command.

OptWhat It DoesExamples
?Display help fileless -?
-mDisplay a long promptless -m
-ppatternStart display where first pattern is foundless +pa*
CommandWhat It Does
<space>Display next screen
n<Enter>Display the next ...

Get Spring Into Linux® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.