从默认的 linux 命令行无限制地向上滚动

use*_*989 5 linux bash debian command-line

我希望从 linux 命令行增加滚动缓冲区的默认大小。它是一个没有 gui 的 Debian 服务器。

我在 bashrc 中没有找到相关选项,我什至不知道默认提示 alt+f1 alt+f2 是否还有其他配置文件...

hek*_*mgl 6

您可以使用内核选项更改回滚缓冲区大小,如下所述:https : //wiki.archlinux.org/index.php/Scr​​ollback_buffer

但是,如果您对命令的输出感兴趣,但同时又想以交互方式查看命令的进度,我建议使用tee

command | tee out.file
Run Code Online (Sandbox Code Playgroud)

或者如果你想附加到文件使用

command | tee -a out.file
Run Code Online (Sandbox Code Playgroud)

tee很好!用它!:)