The less Command

Using the less command is similar to using the cat and more commands. As a matter of fact, the syntax is nearly identical. It's really what the tool does that makes it different. When using the less command, you have more control over the pager than ever before.

Here is a good example of the differences between more and less:

>more hosts.allow

If you try to use the arrow keys for navigation while using the more command, you will find that you can only move forward through the file with the Spacebar. There is not a back and forth as there is with the less command. Now try the same things using the less command.

>less hosts.allow

You can move up and down through the file using your arrow keys. You can even move to the right ...

Get SAMS Teach Yourself Unix in 10 Minutes 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.