0

Possible Duplicate:
Search Terminal Output

Imagine this scenario:

You run a command at gnome terminal. This command has made a bunch of outputs to the terminal. After some time, you realize you need the value of a variable (let's say variable_needed) that was printed by the command somewhere in the terminal. How to find it?

KDE terminal used to have a shortcut ctrl+shift+f which searched the terminal output. It seems that gnome-terminal doesn't have it (at least at Ubuntu 10.04.2 LTS). Is there any way of adding it? Is there any other good terminal I could use that has it?

Notice that the output has already been written so I don't want (cannot) run the command again combined with grep, |, >, vim, emacs, etc.

1 Answers1

0

Unfortunately, gnome's terminal don't have the search screen buffer facility and I never tried any third party terminals. But when I am in a pinch like you are, I just select all the the text in buffer (edit menu-->select all), then open a gedit session and click middle button (or equivalent) while gedit window is in focus to paste the selected buffer area. Then use gedit's search functionality to look for what I'm after.

I know this is not what you want to hear, but if this is once in a while experience of yours, it suits the purpose and it needs no additional package installations or anything. And if you find yourself too much in this situation, I suggest strating your sessions with the script command, so that you can search the whole session transaction buffer with tools like grep.

MelBurslan
  • 1,344