与其滚动数百行输出以查看先前的命令历史记录,还可以清除最后一条命令的输出吗?例如,在执行之后ls,清除它的输出,因为你不再需要它了。
编辑:
这不是您通常的操作clear或ctrl+L操作。这个想法是通过历史记录向后滚动以查找上一个命令的输出,但除非我真的想要,否则不必滚动超过ls, or cat, 或sudo apt-get install输出的负载。它可能看起来像这样:
cat fileIWantToRemember
ls directoryIWantToForget
# some command that wipes the output of ls
# scroll back to see the output of cat immediately
Run Code Online (Sandbox Code Playgroud)