> ## Content Index
> Fetch the complete content index at: https://www.binarysludge.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# The Definitive Guide to Bash Command Line History
- URL: https://www.binarysludge.com/2013/04/04/the-definitive-guide-to-bash-command-line-history/
- Published: 2013-04-04T14:13:06.000Z
- Updated: 2013-04-04T14:13:51.000Z
- Author: Andrew Martin
- Tags: bash, linux, Programming, #Import 2026-10-22 12:56

I found a comment in one of my environment files reminding me how to prevent commands prefixed with a space from being logged in BASH's history file:

export HISTIGNORE="&:[ ]*:exit"

Fortunately the comment pointed me back to the original source of the trick: 

[The Definitive Guide to Bash Command Line History - good coders code, great reuse](http://www.catonmat.net/blog/the-definitive-guide-to-bash-command-line-history/?ref=binarysludge.com)

> Let me teach you how to work efficiently with command line history in bash.