0

Want less cmd to clear content on terminal on exit in server and display back what was there before. I am used to this in my mac and wants the same behavior in the server.

My internet search gives answer to the opposite scenario-- how to retain the content when less exits (less -X behavior) and I want the opposite.

I looked at answers at Neither `less` or `less -X` clear screen on exit

I am using iTerm2 and in my server echo $TERM shows xterm-256color echo $LESS shows blank

I use unix but but not at expert level skills. I am specifically seeking what settings I should use so that when I leave less the terminal bash shell content should be back.

  • An additional point to those who want to help me solve this. – MoonDash Feb 25 '22 at 14:58
  • An additional point to those who want to help me solve this. In some servers that I use less exists and clears the screen to show the shell content; but in others, it doesn't. In both cases, $LESS shows blank. My guess is there is something else in the server config/settings that affects this behavior and I don't know enough to investigate this. Our sys admins still don't have an idea why this happens. For those who know more about this area, your help will be greatly appreciated. – MoonDash Feb 25 '22 at 15:05

0 Answers0