LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Is there any command to delete bash command history? (https://www.linuxquestions.org/questions/linux-newbie-8/is-there-any-command-to-delete-bash-command-history-811310/)

cola 05-31-2010 11:59 AM

Is there any command to delete bash command history?
 
What's the command to delete bash command history?
Not this:
Code:

echo "">.bash_history
rm -rf .bash_history


druuna 05-31-2010 12:08 PM

Hi,

history -c, that is assuming you use bash (which it looks like).

Hope this helps.

bsat 06-01-2010 02:44 AM

histroy -d "command number" in case you want to delete a specific entery

ajeetsinghraina 06-01-2010 03:39 AM

Edit your .bashrc and add

HISTFILESIZE=0
HISTSIZE=0

Of course, you will not be able to use the up-arrow to retrieve your previous command. OR set HISTSIZE to something that will allow minimum exposure.

cola 06-01-2010 07:32 AM

Thanks everybody for your replies.


All times are GMT -5. The time now is 06:34 AM.