Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

As I understand it, less is more + the ability to scroll up. Is it correct? Is there any reason to use more instead of less? Are there any significant differences I'm missing out?

share|improve this question
1  
In CentOS I've noticed rendering differences like in "less" all of the escaped characters show up but in "more" it appears that it ignores them. That's about the only time I'll use "more". –  Rob Olmos Dec 16 '10 at 4:34
1  
There are other file pagers, too, such as most and pg, etc. –  Dennis Williamson Dec 16 '10 at 5:00

2 Answers 2

up vote 7 down vote accepted

less is a full-screen application that gives you a searchable, scrollable window and clears the screen after you exit, less can also be backgrounded and restored like other full screen terminal applications. less also has a command to open the currently viewed file in your default editor.

more just prints the text as is, stopping for page breaks, and does not clear the screen, it can be backgrounded but it doesn't clear the screen. more also only reads in the file as it displays where less may read the file into memory first. each handles line wrapping differently which gives different results when selecting and pasting text.

both tools fulfill the same function but they do it in different ways, so you can pick whichever one you want for the situation at hand.

share|improve this answer

From my less(1):

DESCRIPTION

Less is a program similar to more (1), but which allows backward movement in the file as well as forward movement. Also, less does not have to read the entire input file before starting, so with large input files it starts up faster than text editors like vi (1).

[...]

COMPATIBILITY WITH MORE

If the environment variable LESS_IS_MORE is set to 1, or if the program is invoked via a file link named "more", less behaves (mostly) in conformance with the POSIX "more" command specification.

If you check, you may find that on your system, less is in fact precisely more, with compatibility as described above:

$ shasum $(which less) $(which more)
268084f9ca3528888f01010b1f4f49100177f553  /usr/bin/less
268084f9ca3528888f01010b1f4f49100177f553  /usr/bin/more
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.