less <file>Opens a file in a scrollable pager without loading it all into memory.
Example
less /var/log/syslogA pager for viewing large files and command output one screen at a time, with search and follow mode.
sudo apt install lessless <file>Opens a file in a scrollable pager without loading it all into memory.
Example
less /var/log/syslogless -N <file>Shows line numbers.
Example
less -N app.pyless -S <file>Chops long lines instead of wrapping — scroll sideways with the arrow keys.
Example
less -S access.logless +F <file>Follows the file like tail -f. Press Ctrl-C to stop following and F to resume.
Example
less +F /var/log/auth.logless -R <file>Displays ANSI colour codes correctly.
Example
less -R build.log<command> | lessPages through the output of any command.
Example
journalctl -b | less/<pattern>Searches forward; press n for the next match and N for the previous.
Example
/error?<pattern>Searches backward.
Example
?Failed password&<pattern>Shows only lines matching the pattern; & with no pattern clears the filter.
Example
&sshdg / GJumps to the start (g) or end (G) of the file.
<n>gJumps to line n.
Example
250gqQuits.
Concatenates files and prints them to standard output — view, combine and create files.
Prints the last lines of files and follows them as they grow — the standard way to watch logs.
Searches text for lines matching a pattern, with regular expressions, recursion and context.
Prints the first lines or bytes of files — quick previews of logs and data.