less

Page through file content interactively with search and navigation.

low risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
What it does

less is an interactive file viewer that loads files page-by-page (unlike cat). Supports forward/backward navigation, regex search with /, and following live files with F. Handles arbitrarily large files efficiently.

Common flags
FlagMeaning
-N --line-numbersShow line numbers
-S --chop-long-linesDon't wrap long lines
-i --ignore-caseCase-insensitive search
-F --quit-if-one-screenExit if content fits on screen
Examples
less /var/log/syslogBrowse syslog interactively · explain & risk-check →
kubectl logs pod-name | lessPage through pod logs · explain & risk-check →
less -N +/ERROR app.logOpen with line numbers, jump to first ERROR · explain & risk-check →
less +F /var/log/app.logStart in follow mode (like tail -f) · explain & risk-check →
Pro tip

Inside less, press `F` to enter follow mode (like tail -f), then `Ctrl+C` to stop following and browse backward — the best of both worlds.

Related
tail head grep
Open the full explainer →More in Text Processing

Reference text is hand-written and may be incomplete — check man less for your version. Test destructive commands on a non-production system first.