Bash History Life Hack

I use my shell to take quick notes I don’t want to forget. Like a phone number or an address, so I can look them up later.

I first make sure I have a long bash_history (in ~/.bashrc):


HISTSIZE=1500
HISTFILESIZE=1500

export HISTSIZE HISTFILESIZE

Then when someone gives me something I need for later, I type that in my shell and hit enter. Bash complains that the command is not found, and writes it to my history. Later, I hit ctrl+r and type a few letters or numbers and it’s displayed.

About Nathan Powell

I am a middle aged technologist freak-ball.
This entry was posted in lifehacking. Bookmark the permalink.

3 Responses to Bash History Life Hack

  1. Andy says:

    I have been using Tomboy for note taking, and it has been working quite well. :-)

  2. Don Spidell says:

    Here’s my address for you to write down in bash: rm -rf *

  3. Andy, I have tried tomboy in the past…and I don’t recall a damn thing about it. The thing I like about using the shell is…well…it’s always there. If my computer is on, there is a terminal loaded. I wouldn’t use it for a real todo list, but for…”Oh crap, I need to write this down I like it”.

    Don, heh, oh yeah, believe me I have thought of that…what if the note IS a command and I do something stupid…luckily for me, I am not afraid to do stupid things :)