Madhav Kobal's Blog

This blog will be dedicated to Linux, Open Source and Technology news, affairs, how-tos and virtually EVERYTHING in these domains.

Posts Tagged ‘Tricks’

Keep a Command Out of History

Posted by madhavkobal on 14/10/2009

If you want an easy way to keep commands out of your ~/.bash_history, do the following:

put this in your .bashrc:

export HISTCONTROL=ignorespace

then in a new bash session when you type in a command, if you put a space before it, it doesn’t appear in your history.

$echo hello #in history

//
//

$ echo hello #not in history

Advertisements

Posted in Uncategorized | Tagged: | Leave a Comment »