0% found this document useful (0 votes)
62 views2 pages

Less PDF

The less command is used to view text files in Linux. It allows viewing files page by page using spacebar/page down and scrolling line by line with arrow keys. The q key quits less. Less is useful because many Linux configuration and script files are text-based.

Uploaded by

Nenad Okiljevic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views2 pages

Less PDF

The less command is used to view text files in Linux. It allows viewing files page by page using spacebar/page down and scrolling line by line with arrow keys. The q key quits less. Less is useful because many Linux configuration and script files are text-based.

Uploaded by

Nenad Okiljevic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

less

The less command is a program to view text files.
● Example

If you want to view a text file named myfile
less myfile
● If you want to quit viewing the file, Just press q

and this will close less.
● Why are we so interested in viewing text files ?

Because many of the system configuration files are text­
based, and even scripts that are used by the system to 
automate tasks are also text­based files.Basically, Most 
of the files in Linux are text­based files.

 
less commands
key Action

Spacebar 
or   Next page
Page down
b
or Previous page
Page up
Up arrow Scroll up one line

Down arrow Scroll down one line

G Move to the end of the text file

g Move to the beginning of the text file

/text Search Forward to the next occurence of text

n Search for the next occurence of the previous search

h Display help screen

q Quit less

You might also like