Copying the GNU screen scrollback buffer to a file (extended hardcopy)

前端 未结 7 485
隐瞒了意图╮
隐瞒了意图╮ 2020-12-12 08:43

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

In GNU screen, I can use \"Ctrl

7条回答
  •  轮回少年
    2020-12-12 09:06

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

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

    hardcopy -h 
    

    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.

提交回复
热议问题