Oh, and a hint for everyone who is still grep
ing through the bash
history to find the command he used … well, way back. Try Ctrl+R 😉
Yeah, hit Ctrl+R when on the console and enter the first few characters of the command line you search in the history. Now let’s say you had multiple entries to cp
a file somewhere, then simply use Ctrl+R again to “go back” within the search matches.
BTW: If you ever mistakenly entered a sensitive password on the command line, use export HISTSIZE=0
, log out and log back in, the history will be gone. Of course this erases the whole bash
history, so better don’t enter the password on the command line in the first place 😆
Oh, and another one. Are you still logging off just to apply the settings of a changed .bashrc
or .bash_aliases
? Forget about it, use . ~/.bashrc
or (which is the same) source ~/.bashrc
, to apply the variables to your currently running shell session. I expect my readers to be intelligent enough to vary the scheme and apply it to .bash_aliases
and, well, other files
// Oliver