less

View file contents interactively, one screen at a time.

What it does

less lets you scroll through files and command output interactively. It is the modern replacement for more and allows forward and backward navigation, searching, and efficient viewing of large files.

Quick Start

# View a file
less file.txt

# View command output
dmesg | less

Examples

# Open a log file
less /var/log/syslog

# Search inside less (type /pattern while open)
# Example: /error

# Start at end of file
less +G logfile

# Follow like tail
less +F logfile

Notes