Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.mac.system > #55678 > unrolled thread

How Does One Clear the Terminal Window?

Started byDavoud <star@sky.net>
First post2014-01-31 20:54 -0500
Last post2014-02-01 13:24 -0600
Articles 20 on this page of 22 — 12 participants

Back to article view | Back to comp.sys.mac.system


Contents

  How Does One Clear the Terminal Window? Davoud <star@sky.net> - 2014-01-31 20:54 -0500
    Re: How Does One Clear the Terminal Window? Siri Cruz <chine.bleu@yahoo.com> - 2014-01-31 18:20 -0800
      Re: How Does One Clear the Terminal Window? Martin Frost me at invalid stanford daht edu <nospam@stanford.edu.invalid> - 2014-01-31 18:26 -0800
        Re: How Does One Clear the Terminal Window? David Ritz <dritz@mindspring.com> - 2014-01-31 21:40 -0600
          Re: How Does One Clear the Terminal Window? Davoud <star@sky.net> - 2014-01-31 23:54 -0500
          Re: How Does One Clear the Terminal Window? Barry Margolin <barmar@alum.mit.edu> - 2014-02-01 03:10 -0500
            Re: How Does One Clear the Terminal Window? Jolly Roger <jollyroger@pobox.com> - 2014-02-01 15:06 +0000
              Re: How Does One Clear the Terminal Window? Alan Browne <alan.browne@FreelunchVideotron.ca> - 2014-02-01 10:57 -0500
                Re: How Does One Clear the Terminal Window? Barry Margolin <barmar@alum.mit.edu> - 2014-02-01 11:22 -0500
                  Re: How Does One Clear the Terminal Window? Alan Browne <alan.browne@FreelunchVideotron.ca> - 2014-02-01 11:25 -0500
                  Re: How Does One Clear the Terminal Window? Jolly Roger <jollyroger@pobox.com> - 2014-02-01 16:47 +0000
                Re: How Does One Clear the Terminal Window? Jolly Roger <jollyroger@pobox.com> - 2014-02-01 16:46 +0000
              Re: How Does One Clear the Terminal Window? Doug Anderson <ethelthelogremovethis@gmail.com> - 2014-02-01 10:04 -0800
      Re: How Does One Clear the Terminal Window? Davoud <star@sky.net> - 2014-01-31 22:25 -0500
        Re: How Does One Clear the Terminal Window? JF Mezei <jfmezei.spamnot@vaxination.ca> - 2014-01-31 22:32 -0500
        Re: How Does One Clear the Terminal Window? Jolly Roger <jollyroger@pobox.com> - 2014-02-01 04:55 +0000
        Re: How Does One Clear the Terminal Window? Jim Gibson <jimsgibson@gmail.com> - 2014-02-03 10:31 -0800
    Re: How Does One Clear the Terminal Window? Tim Streater <timstreater@greenbee.net> - 2014-02-01 09:18 +0000
      Re: How Does One Clear the Terminal Window? Patty Winter <patty1@wintertime.com> - 2014-02-01 17:55 +0000
        Re: How Does One Clear the Terminal Window? Tim Streater <timstreater@greenbee.net> - 2014-02-01 17:59 +0000
          Re: How Does One Clear the Terminal Window? Patty Winter <patty1@wintertime.com> - 2014-02-01 18:48 +0000
            Re: How Does One Clear the Terminal Window? David Ritz <dritz@mindspring.com> - 2014-02-01 13:24 -0600

Page 1 of 2  [1] 2  Next page →


#55678 — How Does One Clear the Terminal Window?

FromDavoud <star@sky.net>
Date2014-01-31 20:54 -0500
SubjectHow Does One Clear the Terminal Window?
Message-ID<310120142054043168%star@sky.net>
Not just the visible part that "clear" takes care of, but permanently
clear the entire ancient history in the terminal window?

TIA!

-- 
I agree with almost everything that you have said and almost everything that
you will say in your entire life.

usenet *at* davidillig dawt cawm

[toc] | [next] | [standalone]


#55679

FromSiri Cruz <chine.bleu@yahoo.com>
Date2014-01-31 18:20 -0800
Message-ID<chine.bleu-4EDFCD.18195731012014@news.eternal-september.org>
In reply to#55678
In article <310120142054043168%star@sky.net>, Davoud <star@sky.net> wrote:

> Not just the visible part that "clear" takes care of, but permanently
> clear the entire ancient history in the terminal window?
> 
> TIA!

Command-K or the unix command clear.

-- 
:-<> Siri Seal of Disavowal #000-001. Disavowed. Denied. Deleted.
'I desire mercy, not sacrifice.'

[toc] | [prev] | [next] | [standalone]


#55680

FromMartin Frost me at invalid stanford daht edu <nospam@stanford.edu.invalid>
Date2014-01-31 18:26 -0800
Message-ID<myr47nefgf.fsf@Sunburn.Stanford.EDU>
In reply to#55679
Siri Cruz <chine.bleu@yahoo.com> writes:

> In article <310120142054043168%star@sky.net>, Davoud <star@sky.net> wrote:
> 
> > Not just the visible part that "clear" takes care of, but permanently
> > clear the entire ancient history in the terminal window?
> > 
> > TIA!
> 
> Command-K or the unix command clear.

'clear' only clears the visible part, not the scrollback.  

In Terminal, Command-K clears both, and it's in the View menu.

Martin

[toc] | [prev] | [next] | [standalone]


#55684

FromDavid Ritz <dritz@mindspring.com>
Date2014-01-31 21:40 -0600
Message-ID<alpine.OSX.2.11.1401312131040.57398@mako.ath.cx>
In reply to#55680
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday, 31 January 2014 18:26 -0800, 
 in article <myr47nefgf.fsf@Sunburn.Stanford.EDU>, 
 Martin Frost me at invalid stanford daht edu <nospam@stanford.edu.invalid> wrote:

> Siri Cruz <chine.bleu@yahoo.com> writes:

>> In article <310120142054043168%star@sky.net>, Davoud <star@sky.net> wrote:

>>> Not just the visible part that "clear" takes care of, but permanently
>>> clear the entire ancient history in the terminal window?

>> Command-K or the unix command clear.

> 'clear' only clears the visible part, not the scrollback.  

> In Terminal, Command-K clears both, and it's in the View menu.

You'll need to locate a history file, in your home directory.  Here 
are some examples.

 $ ls -alF .*history
 -rw-------+ 1 dritz  staff  10513 Nov 26 12:38 .bash_history
 -rw-------+ 1 dritz  staff   7056 Jan 31 21:28 .history
 -rw-------+ 1 dritz  staff   8736 Aug  3 11:37 .sh_history

Which history file is correct, depends on the shell you're using.

Use rm, to delete the appropriate file.  Exit the terminal and open a 
new window.  With some luck, your history will have disappeared.

- -- 
David Ritz <dritz@mindspring.com>
 Be kind to animals; kiss a shark.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (Darwin)

iEYEARECAAYFAlLsbK0ACgkQUrwpmRoS3usVPACeL7sm02eftrnQFOg6efStr+pR
Cl0An2RBrMds3BtcrCOnGKiqZATQ/+Lc
=QbIG
-----END PGP SIGNATURE-----

[toc] | [prev] | [next] | [standalone]


#55685

FromDavoud <star@sky.net>
Date2014-01-31 23:54 -0500
Message-ID<310120142354409017%star@sky.net>
In reply to#55684
David Ritz:
> You'll need to locate a history file, in your home directory.  Here 
> are some examples.
> 
>  $ ls -alF .*history
>  ...

Bingo. Many thanks.

-- 
I agree with almost everything that you have said and almost everything that
you will say in your entire life.

usenet *at* davidillig dawt cawm

[toc] | [prev] | [next] | [standalone]


#55689

FromBarry Margolin <barmar@alum.mit.edu>
Date2014-02-01 03:10 -0500
Message-ID<barmar-19FA45.03104401022014@news.eternal-september.org>
In reply to#55684
In article <alpine.OSX.2.11.1401312131040.57398@mako.ath.cx>,
 David Ritz <dritz@mindspring.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Friday, 31 January 2014 18:26 -0800, 
>  in article <myr47nefgf.fsf@Sunburn.Stanford.EDU>, 
>  Martin Frost me at invalid stanford daht edu <nospam@stanford.edu.invalid> 
>  wrote:
> 
> > Siri Cruz <chine.bleu@yahoo.com> writes:
> 
> >> In article <310120142054043168%star@sky.net>, Davoud <star@sky.net> wrote:
> 
> >>> Not just the visible part that "clear" takes care of, but permanently
> >>> clear the entire ancient history in the terminal window?
> 
> >> Command-K or the unix command clear.
> 
> > 'clear' only clears the visible part, not the scrollback.  
> 
> > In Terminal, Command-K clears both, and it's in the View menu.
> 
> You'll need to locate a history file, in your home directory.  Here 
> are some examples.
> 
>  $ ls -alF .*history
>  -rw-------+ 1 dritz  staff  10513 Nov 26 12:38 .bash_history
>  -rw-------+ 1 dritz  staff   7056 Jan 31 21:28 .history
>  -rw-------+ 1 dritz  staff   8736 Aug  3 11:37 .sh_history
> 
> Which history file is correct, depends on the shell you're using.
> 
> Use rm, to delete the appropriate file.  Exit the terminal and open a 
> new window.  With some luck, your history will have disappeared.

That's the shell's command history, not the scrollback buffer of the 
Terminal window.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***

[toc] | [prev] | [next] | [standalone]


#55696

FromJolly Roger <jollyroger@pobox.com>
Date2014-02-01 15:06 +0000
Message-ID<bl4grmFo2o2U1@mid.individual.net>
In reply to#55689
On 2014-02-01, Barry Margolin <barmar@alum.mit.edu> wrote:
> In article <alpine.OSX.2.11.1401312131040.57398@mako.ath.cx>,
>  David Ritz <dritz@mindspring.com> wrote:
>
> That's the shell's command history, not the scrollback buffer of the 
> Terminal window.

Well, it appears that despite Davoud wording it the way he did in his
initial post ("in the terminal window"), what he actually wanted was to
clear the command history.

-- 
E-mail sent to this address may be devoured by my ravenous SPAM filter.
I often ignore posts from Google. Use a real news client instead.

JR

[toc] | [prev] | [next] | [standalone]


#55703

FromAlan Browne <alan.browne@FreelunchVideotron.ca>
Date2014-02-01 10:57 -0500
Message-ID<ApydnbjeGPvwhHDPnZ2dnUVZ_vadnZ2d@giganews.com>
In reply to#55696
On 2014.02.01, 10:06 , Jolly Roger wrote:
> On 2014-02-01, Barry Margolin <barmar@alum.mit.edu> wrote:
>> In article <alpine.OSX.2.11.1401312131040.57398@mako.ath.cx>,
>>   David Ritz <dritz@mindspring.com> wrote:
>>
>> That's the shell's command history, not the scrollback buffer of the
>> Terminal window.
>
> Well, it appears that despite Davoud wording it the way he did in his
> initial post ("in the terminal window"), what he actually wanted was to
> clear the command history.

He referenced the "entire ancient history", actually.

-- 
“Everybody has a plan until they get punched in the face.”
                                                   - Mike Tyson

[toc] | [prev] | [next] | [standalone]


#55707

FromBarry Margolin <barmar@alum.mit.edu>
Date2014-02-01 11:22 -0500
Message-ID<barmar-F25AE3.11223201022014@news.eternal-september.org>
In reply to#55703
In article <ApydnbjeGPvwhHDPnZ2dnUVZ_vadnZ2d@giganews.com>,
 Alan Browne <alan.browne@FreelunchVideotron.ca> wrote:

> On 2014.02.01, 10:06 , Jolly Roger wrote:
> > On 2014-02-01, Barry Margolin <barmar@alum.mit.edu> wrote:
> >> In article <alpine.OSX.2.11.1401312131040.57398@mako.ath.cx>,
> >>   David Ritz <dritz@mindspring.com> wrote:
> >>
> >> That's the shell's command history, not the scrollback buffer of the
> >> Terminal window.
> >
> > Well, it appears that despite Davoud wording it the way he did in his
> > initial post ("in the terminal window"), what he actually wanted was to
> > clear the command history.
> 
> He referenced the "entire ancient history", actually.

It's still unclear. In one reply he said that Cmd-K does what he wants, 
but he was looking for an equivalent shell command. That clears the 
emulator's scrollback buffer.

But he also replied "Bingo!" to a post that explained how to delete the 
shell command history file.

So either he misunderstood one of the replies, or he's contradicting 
himself.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***

[toc] | [prev] | [next] | [standalone]


#55709

FromAlan Browne <alan.browne@FreelunchVideotron.ca>
Date2014-02-01 11:25 -0500
Message-ID<uMGdnW600bB8gnDPnZ2dnUVZ_o-dnZ2d@giganews.com>
In reply to#55707
On 2014.02.01, 11:22 , Barry Margolin wrote:

> So either he misunderstood one of the replies, or he's contradicting
> himself.

On usenet?  C'mon.


-- 
“Everybody has a plan until they get punched in the face.”
                                                   - Mike Tyson

[toc] | [prev] | [next] | [standalone]


#55712

FromJolly Roger <jollyroger@pobox.com>
Date2014-02-01 16:47 +0000
Message-ID<bl4mpcFpeq7U2@mid.individual.net>
In reply to#55707
On 2014-02-01, Barry Margolin <barmar@alum.mit.edu> wrote:
> In article <ApydnbjeGPvwhHDPnZ2dnUVZ_vadnZ2d@giganews.com>,
>  Alan Browne <alan.browne@FreelunchVideotron.ca> wrote:
>
>> On 2014.02.01, 10:06 , Jolly Roger wrote:
>> > On 2014-02-01, Barry Margolin <barmar@alum.mit.edu> wrote:
>> >> In article <alpine.OSX.2.11.1401312131040.57398@mako.ath.cx>,
>> >>   David Ritz <dritz@mindspring.com> wrote:
>> >>
>> >> That's the shell's command history, not the scrollback buffer of the
>> >> Terminal window.
>> >
>> > Well, it appears that despite Davoud wording it the way he did in his
>> > initial post ("in the terminal window"), what he actually wanted was to
>> > clear the command history.
>> 
>> He referenced the "entire ancient history", actually.
>
> It's still unclear. In one reply he said that Cmd-K does what he wants, 
> but he was looking for an equivalent shell command. That clears the 
> emulator's scrollback buffer.
>
> But he also replied "Bingo!" to a post that explained how to delete the 
> shell command history file.
>
> So either he misunderstood one of the replies, or he's contradicting 
> himself.

Yerp! : )  Anyhow, I'm done here.

-- 
E-mail sent to this address may be devoured by my ravenous SPAM filter.
I often ignore posts from Google. Use a real news client instead.

JR

[toc] | [prev] | [next] | [standalone]


#55711

FromJolly Roger <jollyroger@pobox.com>
Date2014-02-01 16:46 +0000
Message-ID<bl4mo2Fpeq7U1@mid.individual.net>
In reply to#55703
On 2014-02-01, Alan Browne <alan.browne@FreelunchVideotron.ca> wrote:
> On 2014.02.01, 10:06 , Jolly Roger wrote:
>> On 2014-02-01, Barry Margolin <barmar@alum.mit.edu> wrote:
>>> In article <alpine.OSX.2.11.1401312131040.57398@mako.ath.cx>,
>>>   David Ritz <dritz@mindspring.com> wrote:
>>>
>>> That's the shell's command history, not the scrollback buffer of the
>>> Terminal window.
>>
>> Well, it appears that despite Davoud wording it the way he did in his
>> initial post ("in the terminal window"), what he actually wanted was to
>> clear the command history.
>
> He referenced the "entire ancient history", actually.

... "in the terminal window", yep.

-- 
E-mail sent to this address may be devoured by my ravenous SPAM filter.
I often ignore posts from Google. Use a real news client instead.

JR

[toc] | [prev] | [next] | [standalone]


#55719

FromDoug Anderson <ethelthelogremovethis@gmail.com>
Date2014-02-01 10:04 -0800
Message-ID<ccy51u7lpx.fsf@ethel.the.log>
In reply to#55696
Jolly Roger <jollyroger@pobox.com> writes:

> On 2014-02-01, Barry Margolin <barmar@alum.mit.edu> wrote:
> > In article <alpine.OSX.2.11.1401312131040.57398@mako.ath.cx>,
> >  David Ritz <dritz@mindspring.com> wrote:
> >
> > That's the shell's command history, not the scrollback buffer of the 
> > Terminal window.
> 
> Well, it appears that despite Davoud wording it the way he did in his
> initial post ("in the terminal window"), what he actually wanted was to
> clear the command history.

His wording in his post was clear.  

If you just read the subject line though, you might be confused.

[toc] | [prev] | [next] | [standalone]


#55682

FromDavoud <star@sky.net>
Date2014-01-31 22:25 -0500
Message-ID<310120142225402925%star@sky.net>
In reply to#55679
Davoud:
> 
> > Not just the visible part that "clear" takes care of, but permanently
> > clear the entire ancient history in the terminal window?

Siri Cruz:
> Command-K or the unix command clear.

As I tried to make obvious, the Unix command "clear" does not do what I
want. Command-K does it, thank you. But Command-K is not a Unix
command. Anyone know what the Unix command is?

Thanks!

-- 
I agree with almost everything that you have said and almost everything that
you will say in your entire life.

usenet *at* davidillig dawt cawm

[toc] | [prev] | [next] | [standalone]


#55683

FromJF Mezei <jfmezei.spamnot@vaxination.ca>
Date2014-01-31 22:32 -0500
Message-ID<52ec6ab6$0$33498$c3e8da3$9deca2c3@news.astraweb.com>
In reply to#55682
On 14-01-31 22:25, Davoud wrote:

> As I tried to make obvious, the Unix command "clear" does not do what I
> want. Command-K does it, thank you. But Command-K is not a Unix
> command. Anyone know what the Unix command is?


I am not sure there are any VT escape sequences to clear a screen
"history".  The clear command basically sends an escape sequence to the
terminal emulator asking it to clear the current screen.

You'd need to find the right escape sequence needed to clear the screen
and history buffer and do an echo command to emit that escape sequence.

[toc] | [prev] | [next] | [standalone]


#55686

FromJolly Roger <jollyroger@pobox.com>
Date2014-02-01 04:55 +0000
Message-ID<bl3d29Fgtk3U1@mid.individual.net>
In reply to#55682
On 2014-02-01, Davoud <star@sky.net> wrote:
> Davoud:
>> 
>> > Not just the visible part that "clear" takes care of, but permanently
>> > clear the entire ancient history in the terminal window?
>
> Siri Cruz:
>> Command-K or the unix command clear.
>
> As I tried to make obvious, the Unix command "clear" does not do what I
> want. Command-K does it, thank you. But Command-K is not a Unix
> command. Anyone know what the Unix command is?

To be fair, you did ask how to clear the history *from the Terminal
window*. Anyway...

Like David Ritz said, all you need to do is delete the *.history file in
your $HOME.

-- 
E-mail sent to this address may be devoured by my ravenous SPAM filter.
I often ignore posts from Google. Use a real news client instead.

JR

[toc] | [prev] | [next] | [standalone]


#55807

FromJim Gibson <jimsgibson@gmail.com>
Date2014-02-03 10:31 -0800
Message-ID<030220141031278235%jimsgibson@gmail.com>
In reply to#55682
In article <310120142225402925%star@sky.net>, Davoud <star@sky.net>
wrote:

> Davoud:
> > 
> > > Not just the visible part that "clear" takes care of, but permanently
> > > clear the entire ancient history in the terminal window?
> 
> Siri Cruz:
> > Command-K or the unix command clear.
> 
> As I tried to make obvious, the Unix command "clear" does not do what I
> want. Command-K does it, thank you. But Command-K is not a Unix
> command. Anyone know what the Unix command is?

It may depend upon the shell, but tcsh and bash both seem to have the
'history -c' command, which clears the current history list, i.e., the
one you get when you type 'history', and the commands you get
one-at-a-time when you press up-arrow.

The current history list is written out to a file (e.g., ~/.history)
when you log out and restored when you next log in.

-- 
Jim Gibson

[toc] | [prev] | [next] | [standalone]


#55691

FromTim Streater <timstreater@greenbee.net>
Date2014-02-01 09:18 +0000
Message-ID<010220140918146950%timstreater@greenbee.net>
In reply to#55678
In article <310120142054043168%star@sky.net>, Davoud <star@sky.net>
wrote:

> Not just the visible part that "clear" takes care of, but permanently
> clear the entire ancient history in the terminal window?

I've got Clear Scrollback in the Edit menu.

-- 
"The idea that Bill Gates has appeared like a knight in shining armour to
 lead all customers out of a mire of technological chaos neatly ignores 
 the fact that it was he who, by peddling second-rate technology, led them
 into it in the first place."                             - Douglas Adams

[toc] | [prev] | [next] | [standalone]


#55717

FromPatty Winter <patty1@wintertime.com>
Date2014-02-01 17:55 +0000
Message-ID<52ed34f8$0$52733$742ec2ed@news.sonic.net>
In reply to#55691
In article <010220140918146950%timstreater@greenbee.net>,
Tim Streater  <timstreater@greenbee.net> wrote:
>In article <310120142054043168%star@sky.net>, Davoud <star@sky.net>
>wrote:
>
>> Not just the visible part that "clear" takes care of, but permanently
>> clear the entire ancient history in the terminal window?
>
>I've got Clear Scrollback in the Edit menu.

And in my version, it's in the View menu. Should be Cmd-K in 
either event.


Patty

[toc] | [prev] | [next] | [standalone]


#55718

FromTim Streater <timstreater@greenbee.net>
Date2014-02-01 17:59 +0000
Message-ID<010220141759373911%timstreater@greenbee.net>
In reply to#55717
In article <52ed34f8$0$52733$742ec2ed@news.sonic.net>, Patty Winter
<patty1@wintertime.com> wrote:

> In article <010220140918146950%timstreater@greenbee.net>,
> Tim Streater  <timstreater@greenbee.net> wrote:
> >In article <310120142054043168%star@sky.net>, Davoud <star@sky.net>
> >wrote:
> >
> >> Not just the visible part that "clear" takes care of, but permanently
> >> clear the entire ancient history in the terminal window?
> >
> >I've got Clear Scrollback in the Edit menu.
> 
> And in my version, it's in the View menu. Should be Cmd-K in 
> either event.

That's Clear All. Clear Scrollback is shift-cmd-k. Which appears to be
precisely what he asked for (see above).

-- 
"The idea that Bill Gates has appeared like a knight in shining armour to
 lead all customers out of a mire of technological chaos neatly ignores 
 the fact that it was he who, by peddling second-rate technology, led them
 into it in the first place."                             - Douglas Adams

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.sys.mac.system


csiph-web