如何在Mac OS X的终端中清除以前的输出?

欧尼尔

我知道clear可以“清除”当前屏幕命令,但是它只是通过打印许多换行符来实现的-清除的内容只是向上滚动。

有没有办法完全清除终端上所有以前的输出,以便即使向上滚动也无法到达?

阿洛克·辛哈尔(Alok Singhal)

要手动清除终端:

+K

Command+K适用于较新的键盘

从shell脚本中清除终端;

/usr/bin/osascript -e 'tell application "System Events" to tell process "Terminal" to keystroke "k" using command down'

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章