Bash’s your friend

Oh, and a hint for everyone who is still greping 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 :mrgreen:

// Oliver

This entry was posted in EN, Linux, Programming, Software. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *