date: 2007-11-26 12:32:13+00:00
Bash tips and tricks
categories: - Bash - Linux
I'll post his tips here in a shorter version
The following snippets of code must be added to your .bashrc file.
You open two terminals, when closing them, history of only one of both is saved ? This is the fix, that will merge/append histories from both terminals in the history :
shopt -s histappend
Avoiding spelling mistakes (like /ect instead of /etc) :
shopt -s cdspell
Disable duplicate entries in history (this is the default under Ubuntu) :
I'm adding a new one, same as above. ignorespace won't store in history every command started by a space. Nice when you need to type sensitive info at the CLI.
Remove ls, fg, bg and exit commands from history :
Multiple line commands split up in history :
shopt -s cmdhist