less (Unix)
![]() Less output in a x-terminal | |
Developer(s) | Mark Nudelman |
---|---|
Stable release | 394
/ 3 Dec 2005 |
Repository | |
Operating system | Cross-platform |
Type | system utility |
License | GPL |
Website | [1] |
less is a program on Unix and Unix-like systems used to view (but not change) the contents of a text file one screen at a time. It is similar to more, but has the extended capability of allowing both forward and backward navigation through the file. Unlike vi (which can also be used to view files), less does not need to read the entire file before starting, resulting in faster load times with large files. The command-syntax is:
less [options] <file_name>
less can be invoked with options to change its behaviour, for example, the number of lines to display on the screen. These options may vary from one Unix to another. While less is displaying the file, various commands can be used to navigate through the file. These commands are based on those used by both more and vi. It is also possible to search for character patterns in the file through an incremental search.
By default, less displays the contents of the file to the standard output (one screen at a time). If the output is redirected to anything other than a terminal, for example a pipe to another command, less behaves like cat.
less was written by Mark Nudelman in 1983 and is now part of the GNU project. It is included in most Unix systems.