From: John Hasler on
Backpacker writes:
> I mention all this as a potential security issue. If you think that
> 'clear' or Ctrl+L has hidden what you were doing in the terminal, it
> hasn't.

Try "tput reset".
--
John Hasler
jhasler(a)newsguy.com
Dancing Horse Hill
Elmwood, WI USA
From: jellybean stonerfish on
On Wed, 27 Jan 2010 22:16:26 +0000, unruh wrote:


> It has hidden what you did on the window. Hide does not mean destroy.
> Anyway,
> rm -f ~/.bash_history

With "bash" this will delete the history file.

> and close the window

With "bash" this will save the commands from your current history into
the history file.

> should do at least part of it.

Your suggestion will clear the history file of the commands from the
previous sessions, and save the commands from the current session. I
think this is the opposite of what the OP wanted. As the OP hasn't
come back, and seeing that his nym "Peter Hanke" could be a reference
to toilet paper, I think he may not even exist. If he does exist,
and that is his real name, "Sorry Peter".



From: Barry Margolin on
In article <4b6028ea$0$6582$9b4e6d93(a)newsspool3.arcor-online.net>,
peter_ha(a)andres.net (Peter Hanke) wrote:

> Assume I opened a terminal window and entered a lot of commands.
>
> Is there a way to clear all previous input and output lines on this terminal
> window?
> Of cause without closing and re-opening the Terminal window.
> Afterwards the terminal should look like as if the terminal had been just
> opened.
> All history lines are deleted.
>
> I guess there is a command like
>
> clr
>
> or similar to achieve this
>
> Peter

"clear" clears the display. I don't think there's a command to clear
history.

--
Barry Margolin, barmar(a)alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
From: despen on
jellybean stonerfish <stonerfish(a)geocities.com> writes:

> On Wed, 27 Jan 2010 22:16:26 +0000, unruh wrote:
>
>
>> It has hidden what you did on the window. Hide does not mean destroy.
>> Anyway,
>> rm -f ~/.bash_history
>
> With "bash" this will delete the history file.
>
>> and close the window
>
> With "bash" this will save the commands from your current history into
> the history file.
>
>> should do at least part of it.
>
> Your suggestion will clear the history file of the commands from the
> previous sessions, and save the commands from the current session. I
> think this is the opposite of what the OP wanted. As the OP hasn't
> come back, and seeing that his nym "Peter Hanke" could be a reference
> to toilet paper, I think he may not even exist. If he does exist,
> and that is his real name, "Sorry Peter".

There are at least 3 things to clear.

The screen, the shell history file, the terminal emulators scroll back
buffer.

Using rxvt, "clear" clears the screen.
"tput reset" clears the screen _and_ the scroll back buffer.
From: Aragorn on
On Thursday 28 January 2010 03:58 in comp.os.linux.misc, somebody
identifying as Barry Margolin wrote...

> In article <4b6028ea$0$6582$9b4e6d93(a)newsspool3.arcor-online.net>,
> peter_ha(a)andres.net (Peter Hanke) wrote:
>
>> Assume I opened a terminal window and entered a lot of commands.
>>
>> Is there a way to clear all previous input and output lines on this
>> terminal window?
>> Of cause without closing and re-opening the Terminal window.
>> Afterwards the terminal should look like as if the terminal had been
>> just opened.
>> All history lines are deleted.
>>
>> I guess there is a command like
>>
>> clr
>>
>> or similar to achieve this
>
> "clear" clears the display. I don't think there's a command to clear
> history.

Yes there is...

man history

;-)

--
*Aragorn*
(registered GNU/Linux user #223157)