ovi.ro

ovi.ro

Clear putty window fully

If you want to full clear putty window including the scroll history with just a command, here is your answer.
It seems there is a way to clear the scroll buffer just by sending some special characters with print.

[php toolbar=”false”]printf ‘\033[3J'[/php]

To make it easier, just put it in your .bash_profile as a new alias:

[crayon toolbar=”false”]echo -e “\nalias cls=\”clear && printf ‘\033[3J’\”\n” >> ~/.bashrc[/crayon]

and then you can use cls to clear both screen and putty scroll buffer.