This: Save all the terminal output to a file
Except after the fact. Meaning that instead of preparing to record or pipe all output to a file, I am dealing with output that has already taken place, and that I omitted to record to a file. Rather than to spend minutes scrolling up 7000 lines of output, copying and pasting that to a document, I have to think there is an easier way to get the current output.
Considering that this may depend upon the terminal emulator, I am using Konsole and zsh in this case.
How can I save the terminal output to a file after the fact?
tmux
can also do this, in any terminal emulator. see Write all tmux scrollback to a file. note, though, that if you're running tmux on a remote host (e.g. via ssh) then the buffer will be saved on the remote host, not on the local machine you're running your terminal emulator on. – cas Oct 16 '21 at 14:03