Documentation (Topic 1.108)

Objective 1: Use and Manage Local System Documentation

Text and paging

  • In the context of Linux systems, plain text means files or streams of both printable characters and control characters, using a standard encoding scheme such as ASCII.

  • Differentiating text from nontext isn't obvious, but the file command examines a file given as its argument and offers a response that indicates the file type.

  • A pager is a program intended to offer a quick and simple interface for viewing text files, one screen at a time.

  • more is a popular pager available on most Unix systems.

  • less is a full-featured text pager, which emulates more and offers significant advantages. Common less commands are listed in Table 24-1.

    Table 24-1. Common less commands

    less command

    Description

    Space

    Scroll forward one screen.

    D

    Scroll forward one-half screen.

    Return

    Scroll forward one line.

    B

    Scroll backward one screen.

    U

    Scroll backward one-half screen.

    Y

    Scroll backward one line.

    g

    Go to the beginning of the text (could be slow with large amounts of text).

    G

    Go to the end of the text (could be slow with large amounts of text).

    / pattern

    Search forward for pattern, which can be a regular expression.

    ? pattern

    Search backward for pattern, which can be a regular expression.

    H

    Display a help screen.

    :n

    Display next file from command line (two-character command).

    :p

    Display previous file from command line (two-character command).

  • A pager such as less ...

Get LPI Linux Certification in a Nutshell, 2nd Edition 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.