Do Yourself a Favor

Stick this in your .bashrc:

export HISTCONTROL=erasedups
export HISTSIZE=500
export HISTIGNORE=ls:'ls -l':fg

This changes what gets shoved into .bash_history.

  • Erase duplicate entires that have shown up previously.
  • Set the history size to 500
  • Ignore a few specified commands
This entry was posted in Uncategorized. Bookmark the permalink.

One Response to Do Yourself a Favor

  1. I hadn’t known about HISTIGNORE. A Google-search education later, I discovered the * wildcard: HISTIGNORE=”ls *” to ignore “ls” with any arguments.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s