Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Why do Linux people and most programs -- Ruby commands, for instance -- use less instead of more. Isn't more bigger, nicer, and better? What is the advantage to less?

share|improve this question
1  
your next assignment is to determine the differences between cat and dog, and why the latter never took off... :D –  quack quixote Feb 1 '10 at 20:04
1  
dog is nice, also most is a decent pager. –  Justin Smith Feb 1 '10 at 21:53
    
dog support was discontinued after Debian Lenny and Ubuntu Jaunty :'( –  ℝaphink Feb 2 '10 at 14:45

4 Answers 4

up vote 6 down vote accepted

Originally more only allowed forward motion in the file while less allowed you to move freely in the viewed file.

Modern version of more is more versatile.

I think the two wiki pages for more and less shows the current difference quite well.

share|improve this answer
    
so maybe more is more now? –  Yar Feb 1 '10 at 19:35
4  
@Yar - Naw, less is still more :-) –  Nifle Feb 1 '10 at 19:53
    
First thing I do on any *nix machine is make sure my pager is less. –  Andee Mar 27 '11 at 10:04

Because less is more than more...

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). Less uses termcap (or terminfo on some systems), so it can run on a variety of terminals. There is even limited support for hardcopy terminals. (On a hardcopy terminal, lines which should be printed at the top of the screen are prefixed with a caret.)

share|improve this answer
    
Nice! glad I asked –  Yar Feb 1 '10 at 19:35
    
more doesn't read the entire input file either… –  Tobu Feb 1 '10 at 22:42
    
@Tobu, you mean more? –  Yar Feb 1 '10 at 23:29
    
@Yar I do. None of the pagers read the entire input until necessary. The main advantage of less is the one Nifle describes. –  Tobu Feb 2 '10 at 10:57
    
@Tobu, what is the main advantage? That less USED TO be the only one to allow you to go backwards? Also, why is my more command running less on OSX? This is beginning to sound like a conspiracy. –  Yar Feb 2 '10 at 14:18

"Most programs-- Ruby commands, for instance", should be using whatever pager is the default instead of explicitly using a particular one. You can set your preferred pager via the $PAGER environment variable, and any properly behaving program will use that pager. I recommend checking out most as well. view can be nice if you are a fan of vi.

Does anyone know of a pager that has emacs keybindings out of the box (or, even better, a way to use emacsclient as a pager that accepts data from stdin)?

share|improve this answer
    
@Justin Smith, thanks for that. Make your question a proper question and it shall be answered (not by me, of course). –  Yar Feb 1 '10 at 23:30

You should be aware to the most pager, adding the capability of viewing multiple files simultaneously.

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.