LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 09-14-2004, 05:31 PM   #1
GUIPenguin
Member
 
Registered: Aug 2004
Location: Maine
Distribution: Gentoo Linux
Posts: 239

Rep: Reputation: 30
Always clear last command


You know when you open a shell and click the up or down arrow it displays the last command you typed into a terminal

Is there a way or a command that could be written to clear this

Thanks, John!
 
Old 09-14-2004, 05:39 PM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
If you are talking about a bash shell set the HISTSIZE to 0 (zero).

Can be found:

globaly in /etc/profile (or /etc/bashrc)
local in ~/.profile

Hope this helps.
 
Old 09-14-2004, 05:40 PM   #3
MartinN
Member
 
Registered: Nov 2003
Location: Ronneby, Sweden
Posts: 555

Rep: Reputation: 30
Sure,
history -c
if you're using bash (which is pretty much default these days).

Martin
 
Old 09-14-2004, 05:45 PM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Well it migth be that I was a bit too enthusiastic

My option prevents the history entirely, the history -c options clears what's there and after that commands are added to the history again.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
clear history "last" command nistelrooy Linux - Newbie 10 11-03-2010 01:09 PM
how do i replace the clear "clear screen" with the cls command thefedexguy Suse/Novell 2 12-02-2005 06:02 PM
history clear command suguname Linux - Newbie 5 03-05-2005 10:32 AM
Command to clear RAM? flamesrock Linux - Software 9 11-22-2004 07:41 PM
help clear this up synapse Slackware 2 10-05-2004 10:17 AM


All times are GMT -5. The time now is 08:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration