What are the differences between most, more and less?
I'm now using Arch Linux, and find a command
less. To understand the differences between them is a confusing problem. The question Isn't less just more? mentions the differences between
more. Do you know the differences on color performance, shortcuts and ability moving forward and backward?
according to the man page it's pretty much like `less` but can do multiple windows
it seems `less` can't perform color. Run `ls | less` and I get something unreadable.
@MaxfanZone: Try `ls --color=yes | less -R`. `ls` usually disables its text coloring when it's piping to something. `less` needs `-R` to pass ANSI escape characters to the screen or `-r` to pass escape all characters to the screen.
In the special case of the man command, you can set the PAGER environment variable to any one of these pagers or to anything else that works to use as the pager for man pages. Here's one I wrote that uses your favorite browser as a pager so you don't have to use a new set of key bindings. http://dl.dropbox.com/u/54584985/kman
- 7 years ago
moreis an old utility. When the text passed to it is too large to fit on one screen, it pages it. You can scroll down but not up.
Some systems hardlink
less, providing users with a strange hybrid of the two programs that looks like
moreand quits at the end of the file like
morebut has some
lessfeatures such as backwards scrolling. This is a result of
morecompatibility mode. You can enable this compatibility mode temporarily with
LESS_IS_MORE=1 less ....
morepasses raw escape sequences by default. Escape sequences tell your terminal which colors to display.
lesswas written by a man who was fed up with
more's inability to scroll backwards through a file. He turned
lessinto an open source project and over time, various individuals added new features to it.
lessis massive now. That's why some small embedded systems have
less. For comparison,
less's source is over 27000 lines long.
moreimplementations are generally only a little over 2000 lines long.
In order to get
lessto pass raw escape sequences, you have to pass it the
-rflag. You can also tell it to only pass ANSI escape characters by passing it the
lessFAQs for more details: http://www.greenwoodsoftware.com/less/faq.html
mostis supposed to be more than
less. It can display multiple files at a time. By default, it truncates long lines instead of wrapping them and provides a left/right scrolling mechanism. most's website has no information about
most's features. Its manpage indicates that it is missing at least a few
lessfeatures such as log-file writing (you can use
teefor this though) and external command running.
mostuses strange non-vi-like keybindings.
man most | grep '\<vi.?\>'doesn't return anything so it may be impossible to put
mostinto a vi-like mode.
mosthas the ability to decompress gunzip-compressed files before reading. Its status bar has more information than
mostpasses raw escape sequences by default.
“`less` is more, but more `more` than `more` is, so `more` is less `less`, so use more `less` if you want less `more`. (...) If `less` is more than `more`, `most` is more than `less`.” —Slackware Linux Essentials
@AlberteRomero That's it, more or less, at least most-ly,. LOL I really like the horizonital scroll in most.
I just tried `most` because it colours man pages nicely, however I don't think it supports regular expression searches. Also, having to mess around with a `~.mostrc` file to get *vi-like* keybindings leaves me wanting `less`. Sometimes `less` is `more` than `most` :)
@J.A.Corbal Fantastic. I was reading this in public and could not stop laughing. No one around me would get it. So I just kept laughing `more`.