将屏幕(程序)输出保存到文件 [英] Save Screen (program) output to a file

查看:194
本文介绍了将屏幕(程序)输出保存到文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将屏幕的整个输出保存到文件中,以便以后检查所有内容.

I need to save the whole output of Screen to a file to check later all the content.

原因是我正在通过串行端口转储闪存,并使用Screen与之交互.我想将其保存到文件中以检查内存结构.

The reason is that I'm dumping a flash memory through a serial port, using Screen to interface with it. I would like to save it to a file to check memory structure.

我尝试过:

$: screen /dev/ttyUSB0 115200 >> foo.txt
$: screen /dev/ttyUSB0 115200 | tee foo.txt

我也试图从屏幕上使用缓冲文件,但是我不知道如何使用它.

And I've also tried to use bufferfile from screen, but I don't understand how to use it.

有简单的方法吗?

推荐答案

有一个用于记录日志的命令行选项.输出将保存到screenlog.n文件,其中n是屏幕编号. 在屏幕的手册页中:

There is a command line option for logging. The output is saved to screenlog.n file, where n is a number of the screen. From man pages of screen:

-L"告诉屏幕可打开窗口的自动输出日志记录.

‘-L’ Tell screen to turn on automatic output logging for the windows.

这篇关于将屏幕(程序)输出保存到文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆