We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

More and Less

The more and less commands let you view the contents of a file, one page (or line) at a time.

As the adage goes, less is more.

In the context of these commands, less is literally more. The less command does everything that the more command does but also has more features. As a general rule, you should use less instead of more.

You would only use more if you're on a system that doesn't have less installed.

less and more are interactive pagers: they take over your terminal window so you can scroll through a file a page at a time. In less:

  • Press the spacebar to move down one page
  • Press b to move up one page
  • Press / to search
  • Press q to quit back to your shell prompt

Assignment

Answer the questions.