How can I write all the scrollback in a tmux session to a file? (I know that, ex, capture-panel can grab the current screen… But I want the entire scrollback)
|
|
||||
|
|
|
This depends on the value of To capture the entire scrollback, enter copy mode, select the entire scrollback, and yank it into the buffer, then paste it into your file. How you accomplish this will depend on the I have the following in my
The process for capturing the full scrollback is then: PrefixEsc : to enter copy mode v : to begin visual selection (assuming you are already at the bottom of the screen) gg : to capture everything in the scrollback y : to yank it into the buffer Prefixc : open another tmux window
i : enter insert mode in vim Prefixp : paste into file There is also an answer here describing how to copy the buffer to a temporary file using |
||||
|
|
|
With tmux 1.5, the Here is an example binding (suitable for
This captures (up to) 32768 lines of history plus the currently displayed lines. Starting with tmux 1.6, you can use numbers down to INT_MIN if your pane has a history that is deeper than 32Ki lines (usually up to 2Gi lines). Note: The number of lines in the saved file will not always be equal to the pane’s history limit plus its height. When a pane’s history buffer is full, tmux discards the oldest 10% of the lines instead of discarding just one line. This means a pane’s effective history depth will sometimes be as low as 90% of its configured limit. |
|||||||
|