0

I much prefer less over more for paging output since it has a much nicer command interface. However, it has the very annoying feature of clearing the screen back to its original state on exit. The one feature of more that I like is that it leaves the screen alone so you can see the state it was in when you decided to exit (usually at the end of the file).

Even running less in the LESS_IS_MORE emulation mode, the screen is cleared. Is there a way to prevent less from doing this?

1 Answers1

0

less -X file

From the less man page:

-X or --no-init

Disables sending the termcap initialization and deinitialization strings to the terminal. This is sometimes desirable if the deinitialization string does something unnecessary, like clearing the screen.

baelx
  • 3,186