将GNU屏幕回滚缓冲区复制到文件(扩展的硬拷贝) [英] Copying the GNU screen scrollback buffer to a file (extended hardcopy)

查看:63
本文介绍了将GNU屏幕回滚缓冲区复制到文件(扩展的硬拷贝)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何轻松地将GNU屏幕回滚缓冲区复制到文件中?也就是说,硬拷贝"命令的功能更强大吗?

How do I easily copy the GNU Screen scrollback buffer to a file? I.e., a more powerful version of the 'hardcopy' command?

在GNU屏幕上,我可以使用" Ctrl + A Esc "进入回滚 缓冲.然后,我可以标记整个缓冲区,然后使用" Ctrl + A Ctrl + ] "将其粘贴到 Emacs 缓冲区,因此将其保存到文件中.

In GNU screen, I can use "Ctrl + A Esc" to enter the scrollback buffer. I could then mark the entire buffer and use "Ctrl + A Ctrl + ]" to paste it into an Emacs buffer, thus saving it to a file.

但是,这很乏味.是否存在一个Screen命令,该命令可以简单地将回滚缓冲区复制到文件中,就像"hardcopy"在屏幕的可见部分那样?

However, this is tedious. Is there a Screen command that'll simply copy the scrollback buffer to a file, like 'hardcopy' does for the visible portion of the screen?

推荐答案

要将回滚缓冲区的全部内容写入文件,请键入

To write the entire contents of the scrollback buffer to a file, type

Ctrl + A : 进入命令模式,然后

Ctrl + A and : to get to command mode, then

hardcopy -h <filename>

screen的旧版本中,如果只执行hardcopy -h,它将仅写入文件-h.此问题在版本4.2.0中已修复,因此hardcopy -h写入hardcopy.N,其中 N 是当前的窗口编号.

In older versions of screen, if you just do hardcopy -h, it just writes to the file -h. This was fixed in version 4.2.0, so hardcopy -h writes to hardcopy.N where N is the current window number.

这篇关于将GNU屏幕回滚缓冲区复制到文件(扩展的硬拷贝)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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