man.lsPlain-English help for Unix commands

less Page through a file one screen at a time

Opens a file or command output in a scrollable viewer. You can move up and down, and search, without the text scrolling off the screen. Use it for any file or output that is longer than one screen.

Synopsis

less [OPTION]... [FILE]...
command | less [OPTION]...

Common options

Option or formWhat it does
-NShow line numbers down the left side
-SCut long lines off at the screen edge instead of wrapping them. Use the arrow keys to scroll sideways
-iIgnore case when searching, unless the search text has a capital letter
-IIgnore case when searching, even if the search text has capital letters
-RShow ANSI colour codes as colours instead of as raw characters. Needed to see coloured output piped in
-FQuit straight away if the whole input fits on one screen
-XDo not clear the screen on exit, so the text stays in your terminal
-p patternOpen the file at the first match of pattern

Examples

Open a file
less /var/log/system.log
Open a file with line numbers
less -N app.log
Page through a long listing
ls -la /usr/bin | less
Page coloured grep results
grep --color=always -rn error /var/log | less -R
Open a wide file without wrapping lines
less -S data.csv
Start at the first match of a word
less -p timeout app.log

Notes

See also

Last reviewed 2026-10-07.