OSX/Linux,降低终端的输出速度 [英] OSX/Linux, slow down the output from terminal
问题描述
我正在打印屏幕上很长的文本文件,该文件在屏幕上滚动得非常快,是否可以减慢滚动速度?换句话说,有一个系统设置可以控制将输出显示到屏幕(OSX/Linux)的速度.
I'm printing to screen a long text file that scrolls very very quickly on my screen, is there a way to slow down the scrolling? In other words is there a system setting that controls the speed at which output is displayed to screen (OSX/Linux).
推荐答案
简单答案:否.
扩展版本:还有其他解决方案.您可以从以下任一选项中进行选择:
Extended version: There are other solutions. You could pick from one of the following:
-
使用管道.使用管道可以重定向终端输出并以自己的速度对其进行检查.适当的符号是
|
.将输出重定向到诸如less
或more
之类的程序.两者都允许您通过按回车键滚动显示输出,也可以随时按q
退出.例如,要处理较长的目录列表,可以使用
Use pipes. Using pipes allows you to redirect terminal output and to review it in your own speed. The appropiate symbol is
|
. Redirect the output to programs likeless
oremore
. Both allow you to scroll through the output via pressing return, you can exit any time by pressingq
. For instance, for handling a long directory listing, you could use
ls | more
将输出重定向到文件中.如果您的输出缓存在文件中,则该文件是永久性的,并允许您使用选择的编辑器将其打开以查看(和编辑)它.符号是>
.
touch log.txt # create the file
ls > log.txt
nano log.txt # use nano text editor to view
script
允许您记录整个终端sessoins.对于您的用例来说,这可能是一个过大的杀伤力,但确实很有用.在手册页中:
script
allows you to record entire terminal sessoins. This might be an overkill for your use-case, but is really useful. From the man page:
script为您在终端上打印的所有内容制作一个打字稿.它是 对于需要交互式会议的硬拷贝记录的学生很有用 作为作业证明,因为可以打印出打字稿文件 稍后使用lpr(1).
script makes a typescript of everything printed on your terminal. It is useful for students who need a hardcopy record of an interactive session as proof of an assignment, as the typescript file can be printed out later with lpr(1).
这篇关于OSX/Linux,降低终端的输出速度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!