Search Terminal Output

15,519

Solution 1

You could try script(1). On login just call script and you can then search through the typescript file it generates. It's not a single keystroke like emacs shell and it is buffered, but it might be better than nothing.

Solution 2

Try Ctr + Shift + f. This works on Ubuntu terminal and Terminator

Solution 3

In screen you can enter copy mode and do searches on output. You can also do logging of output to a file and search it any way you normally would (grep, less, etc.).

Solution 4

Don't know gnome-terminal but urxvt does that by typing Alt + s. It should be in your repositories, lookup the package rxvt-unicode.

Solution 5

Using xterm, you can log everything the terminal displays to a file. Then you can open that file in an editor or less.

Share:
15,519

Related videos on Youtube

Samer Buna
Author by

Samer Buna

Updated on September 17, 2022

Comments

  • Samer Buna
    Samer Buna over 1 year

    Using a default terminal and bash, there is no functionality to search the standard output of commands.

    One can gain such functionality using other tools, like emacs shell or screen, but I am wondering why such a useful feature is missing, I do remember a simple C-F used to work in terminals.

    Is there a way to make the Gnome terminal app support output search? or is there a better terminal app that support searching output natively?

    • Admin
      Admin over 13 years
      Does piping the command into less not give you what you desire? You can search text in less and many other pagers. Also, shouldn't this be on super user?
  • F. Erken
    F. Erken about 8 years
    Same hotkey in gnome-terminal.