Home > Uncategorized > Do Yourself a Favor

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
Categories: Uncategorized Tags:
  1. June 24th, 2010 at 23:12 | #1

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

  1. No trackbacks yet.