Isn't less just more?
The difference is mostly historical at this point, I believe some systems even have more
and less
hardlinked to the same binary.
Originally, more
pretty much only allowed you to move forward in a file, but was pretty decent for buffering output.
less
was written as an improved more
that allowed you to scroll around the displayed text
The first line of my man less
pretty much sums it up:
Less is a program similar to more, but which allows backward
movement in the file as well as forward movement.
less
is a lot more than more
, for instance you have a lot more functionality:
g: go top of the file G: go bottom of the file /: search forward ?: search backward N: show line number : goto line F: similar to tail -f, stop with ctrl+c S: split lines
And I don't remember more ;-)
In addition to the extra features already mentioned in less
, it also has a v command which opens the current file in vi
at the same position. When you exit vi
, you will be back in less
with the (possibly updated) file shown.