less Command
Definition
less lets you view a file one screen at a time and move forward or backward without loading the entire file into memory at once.Syntax
Loading...Example
Loading...If the file has 10,000 lines, it opens like a viewer.
You can scroll without printing the whole file.
Useful keys inside less
Key | Action |
Down Arrow | Next line |
Up Arrow | Previous line |
Space | Next page |
b | Previous page |
g | First line |
G | Last line |
/word | Search for a word |
n | Next search result |
N | Previous search result |
q | Quit |
Example
Open
Loading...Search for "Neha"
Loading...Press
Loading...It jumps to
Loading...Press
Loading...to go to the next occurrence.
.jpg?table=block&id=29d76b1d-f1a8-8072-a9bf-cc78d1c7d881&cache=v2)
