LinuxCommandLibrary

most

View and scroll through text files

TLDR

Open a file

$ most [path/to/file]
copy

Open several files
$ most [path/to/file1 path/to/file2 ...]
copy

Open a file at the first occurrence of "string"
$ most [path/to/file] +/[string]
copy

Move through opened files
$ <:><n>[<ArrowUp>|<ArrowDown>]
copy

Jump to the 100th line
$ <j>[100]<Enter>
copy

Edit current file
$ <e>
copy

Split the current window in half
$ <CTRL x><o>
copy

Exit
$ <q>
copy

SYNOPSIS

most [options] [file...]

PARAMETERS

-a
    Disable automatic line wrapping.

-b
    Suppress the message at the bottom of the screen.

-c
    Start at top of file, not at last viewed position.

-d
    Use the system default colors.

-E
    Enter extended mode.

-f
    Force open non-regular files.

-g colorscheme
    Use a specific colorscheme.

-i
    Ignore case in searches.

-l
    Suppress highlighting.

-m
    Suppress multiple windows.

-n
    Suppress line numbers.

-o filename
    Write to file and exit.

-r
    Use raw control characters.

-s
    Squeeze blank lines.

-t tabsize
    Set the tab size.

-u
    Suppress underlining.

-v
    Verbose mode.

-w
    Wait for key press on exit.

-x
    Suppress highlighting.

-h
    Display help message and exit.

-V
    Display version information and exit.

file...
    One or more files to view.

DESCRIPTION

most is a paginator similar to less or more, but with added features, including syntax highlighting of various file types and support for multiple windows. It is designed to be a user-friendly and feature-rich pager, making it suitable for viewing source code, configuration files, logs, and other text-based data. Unlike some simpler pagers, most provides navigation capabilities like scrolling, searching, and jumping to specific lines. The syntax highlighting improves readability, particularly when examining code. most can automatically detect file types to apply the appropriate highlighting rules. Configuration is available to customize the highlighting. While not as widely used or actively maintained as less, it offers a compelling alternative for users who value enhanced visual presentation and multiple window support.

CAVEATS

The development and community support for most are not as active as alternatives like less.

CONFIGURATION FILES

most can be customized using configuration files, typically located in ~/.mostrc or a system-wide configuration file. These files allow you to define color schemes, key bindings, and other settings to tailor the pager to your specific preferences.

SYNTAX HIGHLIGHTING

Syntax highlighting in most is rule-based. It can detect and highlight various file types like C, Python, HTML, etc. Customizing highlighting behavior is possible.

HISTORY

most was developed to provide enhanced features beyond basic pagers. The initial development timeline and specific motivations are not widely documented, but it aimed to combine the core functionality of tools like more and less with modern features like syntax highlighting and multiple window support.

The usage of most varies among Linux distributions and user preferences, with less being a more widely adopted alternative.

SEE ALSO

less(1), more(1), pg(1), cat(1)

Copied to clipboard