The less program was designed as an improved replacement of an outdated Unix program called more which is used in viewing text documents . The name "less" is a play on the phase "less is more ".
Less falls into the class of program called "pagers" programs that allow the easy viewing of long text documents in a page manner. Whereas the more program could only page forward and backward and has many other features as well .It can be use for viewing text documents.
Less has many beautiful and amazing command options but we are going to be talking about the basic and mostly used ones. let's drive aright into it now.
Getting around the less environment
1. Page up or b : Scroll back one page.
2. space : Scroll forward one page.
3. up arrow : Scroll up one line.
4. down arrow : Scroll down one line.
5. G : move to the end of text file.
6. 1G or g : move to the beginning of the text file.
7. /character : To perform a character search on the character.
8. n : To move to the next occurrence of the of the last search.
9. q : To quit less
10. h : To display help screen.
There are many more options other than the ones I talked about which can be located in the man page. To view it just type $ man less to view it
Comments
Post a Comment