1 2 3
tmux capture-pane -J -p -t %123 > file.txt The %123 is pane unique id. You can get that one by executing echo $TMUX_PANE inside a target pane.
You can clone a snippet to your computer for local editing. Learn more.