Skip to main content
Back to Commands
MiscellaneousOften bound, e.g. bind P pipe-pane -o 'cat >>~/#W.log'

pipe-pane

Short form: pipep

Pipe a pane's output to a shell command for live logging. With no command, any existing pipe is stopped.

Synopsis

bash
tmux pipe-pane [-IOo] [-t target-pane] [shell-command]

Options

FlagDescription
-oOnly start a pipe if none is open, and stop it if one is (toggle)
-IConnect the command's stdout to the pane (input)
-OConnect the pane's output to the command's stdin (default)
-t target-panePane to pipe

Examples

Toggle logging the pane to a file

bash
tmux pipe-pane -o 'cat >> ~/pane.log'

Stop piping the current pane

bash
tmux pipe-pane

Default Keybinding

Often bound, e.g. bind P pipe-pane -o 'cat >>~/#W.log'

Default prefix is Ctrl+b

Pro Tips

  • Use -o so a single key toggles logging on and off
  • #W in the command expands to the window name for per-window logs