Re: Re: Re: Clear screen question
For the benefit of the readers, I found the original thread that I had
replied to. And, I suppose my text appeared twice because that's how
microsoft likes it. ;) I did try to set this email to plain text,
hopefully it will only appear once now.
Of all the days, it was on Sun, Jan 28, 2001 at 09:00:07AM -0600 that
wes schreiner quoth:
> "Sander Smeenk (CistroN Medewerker)" wrote:
> >
> > Quoting wes schreiner (wes@infosink.com):
> >
> > > Not that I can see, though I'd love to know of a clean way to
clear the
> > > scroll-back buffer. I agree it's a bit hackish. Can anyone come
up
> > > with something better?
> >
> > Ehm.. I did this:
> >
> > knopje# echo -e "\033[2J\033[1;1H" > issue.new
> > knopje# cat /etc/issue >> issue.new
> > knopje# mv issue.new /etc/issue
> >
> > And now when i log out from consoles the screen clears and the
scrollback
> > buffer is empty.. The \0332J is ANSI for Clear Screen and \033[1;1H
is ANSI
> > for place cursor on x1 y1...
> >
> > Works for me...
>
> Tried it, but this only clears the immediately visible screen for me,
> not the scroll-back buffer. I'm using mgetty, are you using mingetty
or
> some other *getty? Maybe that's the difference. If so, then Ethan's
vt
> switching method is better because it doesn't depend on the getty.
>
> These ANSI codes do only clear the screen when the user logs out,
> which was the original question. At some point somebody interpreted
it
> to be about clearing the scrollback buffer, and things have been going
> off on that tangent ever since. FWIW, I posted these ANSI codes about
> two days ago and also noted that they don't work at all if you don't
> have an ANSI terminal.
I know this post is from 2001, but I figured out a way to do it in case
someone reads it.
do the lines that were suggested on knopje, but then vi /etc/issue or
use your favorite editor and insert a ton of newlines before it. the
filesize isn't very big and it clears the buffer. You may have to
experiment with just how many newlines you need.
Reply to: