In OSX you can clear all outputs from terminal with Command+L key. But there isn’t a good solution for this as a shell command. You can use clear command but this only clearing current output. Historical output is staying there if you scroll up. If you clear everything you must use that command:

clear && printf '\e[3J'

This is clearing everything. But this is a little complex and long command. You can create alias for this command.

nano ~/.bash_profile

Add this line:

alias cls="clear && printf '\e[3J'"

Now you can use cls command for clearing all outputs from screen. You can use this in Linux environments of course.

Have a nice days.


0 yorum

Bir cevap yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

This site uses Akismet to reduce spam. Learn how your comment data is processed.