LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (http://www.linuxquestions.org/questions/fedora-35/)
-   -   Clear previous commands in Terminal (http://www.linuxquestions.org/questions/fedora-35/clear-previous-commands-in-terminal-463216/)

Hitboxx 07-12-2006 04:22 AM

Clear previous commands in Terminal
 
Hi mates,

A primitive query but how to clear the previous commands in terminal which is accessed by using up/down arrow keys?

Thanks

spooon 07-12-2006 04:30 AM

exit the shell and open another one, and then edit the ~/.bash_history file

Hitboxx 07-12-2006 04:37 AM

Thanks mate. Another invaluable tip. But is there some way to automate that process instead of editing everytime?

spooon 07-12-2006 05:03 AM

Code:

history -c
will clear the entire history i think

and i think putting something like
Code:

unset HISTFILE
in your .bashrc will not keep a history altogether

Hitboxx 07-12-2006 08:20 AM

Wow thanks again man :)


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