The commands of clear
, Ctrl+L, or reset
are not adequate. They do not clear my terminal screen, they just seem to scroll the window down so I can't see everything above.
I want it so that I can't scroll up and see any previous history.
The commands of clear
, Ctrl+L, or reset
are not adequate. They do not clear my terminal screen, they just seem to scroll the window down so I can't see everything above.
I want it so that I can't scroll up and see any previous history.
If you type reset
it'll totally reinitialize your terminal instead of clearing your screen. You can setup a keyboard shortcut for that.
printf "\033c"
also work well and takes less time.
You can alias it by alias cls='printf "\033c"'
too. Now when you type cls
terminal should get cleared.
For more detailed explaination take a look at this Stack Overflow question.
ps $PPID
should tell you that.) The commands you mentioned only send messages; it's up to the particular terminal emulator to respond to those messages, and there is some variation in exactly how they're handled. – deltab Apr 19 '15 at 20:30