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.