4

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?

2
  • 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, 2010 at 4:34
  • 1
    There are other file pagers, too, such as most and pg, etc. Dec 16, 2010 at 5:00

2 Answers 2

8

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.

1
  • also the fact that less indicates the percentage of text being currently displayed gives it an edge over the 'more' command.
    – user325904
    Dec 7, 2015 at 10:10
1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .