Viewing Files with more and less

The more and less commands are known as pagers because they allow you to view the contents of a text file one screen at a time and to page forward and backward through the file (without editing it). The name of the more command is derived from the fact that it allows you to see a file one screen at a time, thereby seeing "more" of it. The less command is similar to more but has more functionality; the name is a humorous play on the phrase "less is more." Nowadays, the less command has many added features, including the fact that you can use keyboard shortcuts such as pressing the letter b when viewing a file to move backward through the file. The man page of less lists all the other hot keys that can be used for navigating through a file while reading it using less. Both more and less use the hot key q to exit.

Was this article helpful?

0 0

Post a comment