$
Learn Linux handbook
en
XP:0
Quest 15Pager
+150 XP

Paging Through Large Files

Launch Interactive Terminal for This Quest→No installation required • Runs fully in browser

Concept & Overview

Peeking at the top and bottom of a file with head and tail is great, but what if you need to browse a long configuration file page-by-page? That's what pagers like less and more are for.

- Pagers load files interactively, showing one page of text at a time to prevent system slowdowns on large files.
- less logs.txt is the modern choice, allowing you to scroll both forward and backward using the arrow keys, search text with /, and exit by pressing q.
- more logs.txt is an older, simpler pager that only scrolls forward.

Let's read a long file page-by-page. Run less logs.txt or more logs.txt (or /etc/hosts) to open it in a scrolling view. (In our terminal, this will output the contents in a scrollable frame. Press q to return).

Command Syntax Reference

Command / SyntaxDescription
less logs.txtOpen logs.txt in the less pager
more logs.txtOpen logs.txt in the more pager
less /etc/hostsOpen hosts file in the less pager
more /etc/hostsOpen hosts file in the more pager

Verification Objectives

These conditions will be automatically verified when you run commands inside the interactive terminal simulator:

  • ○
    Open logs.txt or /etc/hosts in a pager (less or more)

Ready to complete Quest 15?

Test your skills live in the browser terminal with an emulated Linux filesystem, real-time command evaluation, and instant step-by-step hints.