Glam Prestige Journal

Bright entertainment trends with youth appeal.

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).

1

6 Answers

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.

4

If you are running a gnome-terminal (default GUI terminal on ubuntu) you can hit shift+ctrl+f, type your search terms, and hit enter. Still graphical, but no mouse required.

6

Shortcut to find string inside the terminal data : ctrl + shift + f

1

Have you considered using pipe and grep?

YourCommand | grep str

Hope this helps

2

Try konsole in kde. It works with gnome/unity too. Program the Find shortcut to alt-f or ctrl-f, it can search forward or backward, plus it will highlight new output that matched the searching pattern.

For the logs: also guake supports searching via ctrl+shift+f since was merged

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy