Re: How do I clear a terminal screen?

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Jeremy C. Reed
Date:  
To: plug-discuss
Subject: Re: How do I clear a terminal screen?
On Tue, 4 Jan 2005, der.hans wrote:

> > Answering the original question on how to clear a terminal, I often use
> > "reset". And if that doesn't work, I use:
> >
> > printf "\033c"
>
> What char is that?


I think it is the ANSI and VT100 RESET character (to reset terminal to
Initial
State).

http://www.cs.utk.edu/~shuford/terminal/vt100_reference_card.txt

I have used it for maybe eight or more years. It works on many virtual
consoles and also in X terminals.

> <ctrl>-l calls for a repaint.


That does help. And sometimes even "reset" doesn't reset the strange modes
a console can get into.

> xterm has soft and full resets available by using <ctrl> and the middle
> mouse button. Dunno if rxvt or other emulators have something similar.
> That feature is why I continue to use xterms.


I didn't look at source code, but it probably uses the reset from the
terminfo/termcap (such as this ESCAPE c.)

Jeremy C. Reed

                 BSD News, BSD tutorials, BSD links
                http://www.bsdnewsletter.com/


---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss