如何清除屏幕命令中的回滚?
我在 Linux 中使用 screen 命令进行命令行多任务处理,并将回滚缓冲区长度设置为一个非常大的值。 当我不想再保留某个选项卡时,是否有组合键可以清除该选项卡的缓冲区?
I use the screen
command for command-line multitasking in Linux and I set my scrollback buffer length to a very large value. Is there a key combination to clear the buffer for a certain tab when I don't want it sitting there anymore?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
此帖子有以下建议:
在输入
Ca :
后,您也可以从会话中发出scrollback 0
命令。HTH。
This thread has the following suggestion:
You can issue the
scrollback 0
command from the session as well, after typingC-a :
.HTH.
Ca C
会清屏,包括提示clear
(命令,不是组合键)会清屏,留下提示ETA:误读原题; 这些只会清除可见文本,但不会清除缓冲区!
C-a C
will clear the screen, including the promptclear
(command, not key combination) will clear the screen, leaving a promptETA: misread the original question; these will just clear the visible text, but will not clear the buffer!
我还添加了命令“clear”来清理当前屏幕。 注意:您必须按 Enter 键才能重新获得提示。
还将其添加到您的“.screenrc”以使其永久化。
注意,我在斜杠周围添加了单引号,以确保它不会干扰我的“.screenrc”。 可能没有必要。
I added the command "clear" as well to clean the current screen. N.B. You have to press enter to regain you prompt.
Also add it to you ".screenrc" to make it permanent.
N.B. I added single quotes around the slash to be sure it didn't interfere in my ".screenrc". May not be necessary.
Command-K 似乎是 Mac 的最佳解决方案。
有关更多详细信息和说明,请参阅 此页面。
Command-K seems to be best solution for Mac.
For more details and explanations, please refer to this page.
alias cls='printf "\e[3J\033c"'
清除屏幕和回滚缓冲区。
alias cls='printf "\e[3J\033c"'
Clears the screen and scrollback buffer.
在 Ubuntu 上为我工作。
worked for me on Ubuntu.
从手册页:
From the man page: