Ubuntu – How to search terminal output

Ubuntu

Suppose I have a Terminal open that contains thousands of lines of output from my previous commands over the past few hours/days. How do I search that recorded output for a string? I'm especially interested in a solution that doesn't require the mouse.

I know I should have used tee, but that's not always convenient.

I know I could "Select All", then open an editor, paste, then search, but I'm hoping for something simpler (and Select All seems to require the mouse).

I was hoping there would be a "Find…" command in the menu bar (like Mac OS X has).

Best Answer

Finding text in scrollback is a weakness of most terminal emulators; the only ones I know of that provide it are OS X Terminal and Terminator. That said, you could run GNU screen in any terminal and search its scrollback buffer in copy mode.