You're viewing a comment by alan and its responses.

alan Permalink
June 04, 2010, 16:08

"The same can be achieved by tput command,

$ tput clear"

Or you can just use the "clear" command

$ clear

It's also worth mentioning that this doesn't really clear the screen on terminal windows, just scrolls the window by enough lines to make it look cleared. If you scroll back up, you'll still see the old content.

Comment Responses

June 04, 2010, 18:06

It actually depends on your terminal. clear, which internally does the same as tput clear, outputs the CSI 2 J escape sequence that instructs the terminal to erase the data on the screen. There may or may not be line scrolling depending on terminal capabilities.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the word "sandbox": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.