Find in terminal

Search the scrollback with match case, whole word and regular-expression toggles.

findsearchscrollbackregexgrepctrl fcmd f

Find in terminal

Search a terminal's output, including everything that has scrolled off the screen.

How to use it

  1. Press ⌘F on macOS or Ctrl+Shift+F on Windows and Linux. You can also right-click the terminal → Find….
  2. Type what you're looking for. Matches are highlighted, and the counter shows which match you're on out of how many.
  3. Enter goes to the next match and Shift+Enter to the previous one. The arrow buttons do the same.
  4. Esc closes the find bar.

If a single line of text is selected when you open the bar, the search starts with it.

Options

The three toggles in the bar:

Toggle Meaning
Aa Match case
ab Whole word
.* Regular expression

Tips

  • Windows and Linux use Ctrl+Shift+F, so Ctrl+F still reaches the program running in the terminal.
  • Keyword highlighting only changes colours. Find always searches the text exactly as the program wrote it.
  • To find where a command started rather than a word, jump between prompts with ⌘↑ / ⌘↓ (Ctrl+↑ / Ctrl+↓). See Command blocks.
  • The remote file editor has its own find and replace on ⌘F / Ctrl+F. See Remote file editor.

Limits

Find searches the terminal's scrollback buffer. Lines that have been trimmed from the scrollback can't be found. In a full-screen program such as vim or less, use that program's own search.