UnixDroid

Text · Linux command

less command in Linux

What does less do?

less opens a file in a scrollable viewer so you can read big files page by page and search inside them with /word.

less file

Most useful options

OptionWhat it does
/wordsearch forward
nnext match
G / gjump to end / start
qquit

less examples

$ less /var/log/syslog Try it ›

read a big log

$ dmesg | less Try it ›

scroll through command output

In security work

Analysts read huge logs in less without loading everything in an editor.

Questions about less

How do I exit less?

Press q.