less Linux Commands

What is Linux less Command?

Explanation

less COMMAND:

less command is used to display text in the terminal screen. It just prints the text in the given file, you cannot edit or manipulate the text here. To display the file from the specified line, enter the line number followed by colon(:). It allows Forward and backward movement in the file.

SYNTAX :


less [options] filename

OPTIONS:


-c Clear screen before displaying.
+n Starts up the file from the given number.
:p Examine the pervious file in the command line list.
:d Remove the current file from the list of files.

EXAMPLE:


  1. less +3 index.php

    Start printing from 3rd line of the file.

Ask Questions

Ask Question