cmdxray / commands / less

What does less do?

view text one screen at a time (a pager).

▸ Explain your own less command →

less examples, explained

$ less -N server.log

  • lessview text one screen at a time (a pager)
  • -Nshow line numbers
  • server.logan argument passed to the command

$ less -S -R output.txt

  • lessview text one screen at a time (a pager)
  • -Schop long lines instead of wrapping them
  • -Rpass ANSI color escape sequences through unchanged
  • output.txtan argument passed to the command

less flags & options

-Nshow line numbers
-Schop long lines instead of wrapping them
-iignore case in searches
-Fquit immediately if the content fits on one screen
-Rpass ANSI color escape sequences through unchanged
-Xdon't clear the screen on exit
-xset the tab width in columns

Other commands

Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.