You're viewing a comment by Gaurav and its responses.

Gaurav Permalink
October 13, 2012, 05:40

hi,
all the commands are nice and useful specially to find top 10 most used commands :)

but the third one is not working in my system even i am firing commands with space but still it is showing in history

Comment Responses

October 13, 2012, 15:36

I forgot that what gets ignored is configured through the HISTIGNORE variable. It contains a : separated values of command prefixes that should be ignored.

It looks like your distribution doesn't have a default value for this variable.

It should contain this:

export HISTIGNORE="[ ]*"

Meaning - don't log anything to history that starts with a space.

I've this in my .bashrc:

export HISTIGNORE="&:[ ]*"

Here & has a special meaning - ignore repeated commands.

Gaurav Permalink
October 15, 2012, 11:06

hmm. it was hashed in my .bashrc now i have corrected it and it is working :)

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the word "coding": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.