退出后,xterm将页面从终端中减少

Pau*_*aul 5 linux bash xterm less-unix

我经常使用less来查看文件,并想记住我刚刚在文件中看到的内容.但是,当我按q键退出时,我的xterm窗口删除了少显示文件的页面,只显示了我的命令提示符.

当我退出时,如何在终端上保持较少的输出?

Pau*_*aul 7

少-X

使用下面描述的less man页面中的-X选项:

   -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.
Run Code Online (Sandbox Code Playgroud)