How to Use the less Command in Linux

Category: Advanced – Command Line • Est. reading time: 1 minute

The less command lets you read a text file one screen at a time, which is far easier than the cat command for large files. It opens instantly because it does not load the whole file at once.

Open a file

less textFile.txt

Inside less: press Space or the arrow keys to move, type /word to search for text, and press q to quit.

Pipe another command’s output into less

cat largeFile.txt | less

See all the keys

less --help

Related: to see just the top of a file, use the head command.

Running your own dedicated or self-managed server? We are glad to help. Reach us at support@allydrez.com or 1-321-209-2004.