In either Cygwin or gnome terminal,
clear doesn't actually remove the previous output in the terminal. So when I run
clear and then some programs, and search (using the search feature of the terminals) for some word in the output of the programs that are run after
clear , it will also search in the output of the other commands previously run on the screen before
How can i search in the output on a terminal screen since an arbitrarily chosen time point?
My current workaround is to open a new terminal to run the programs whose outputs I would like to search in. But is there a way without opening a new terminal?
tput clearseems to do it, but I dont know why and I didn't test searching.
tput clearis the same as
tput reset, depending on the capabilities of the terminal. Sometimes
resetworks as well.