Search function in the terminal?
It's Shift + Ctrl + F.
You might want to change the Scrollback value to Unlimited to not lose any lines:
-
Edit > Profile Preferences > Scrolling
Another option:
yourCommand | less
Now, you can press the arrow keys to go up,down, left and right (usually you only use the first two).
You can also type /word
so search for a word (or a regex) after the cursor. Conversely, ?word
will search the word/regex before (above) the cursor. (Cursor is the position where you are in the text.)
You can also use Home and End keys to go to the start and end of the output. Pressing Q
will make you Quit (returning to the console).
More info:
man less
You could pipe the output to a file with > myfile.txt
And then search the file with grep.
grep "word" myfile.txt
I usually prefer this approach as you don't need to worry about the terminal buffer size, and you can easily keep output from multiple runs of program.
mycommand | grep "phrase I want to find"
This eliminates @Alb's^ intermediary step of redirecting to a file.
If you use GNU Screen
- copy
mode and jk
works fine.