Running is therapy

a blog about running, cats, Linux and programming.
  • Home
  • Current Schedule
  • Personal Records
  • Upcoming Races

Bash History Life Hack

Published by Nathan Powell on January 3, 2007 08:14 am under lifehacking

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.

3 Comments so far

  1. Andy on January 3rd, 2007

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

  2. Don Spidell on January 3rd, 2007

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

  3. Nathan Powell on January 4th, 2007

    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 :)

Posting your comment.

  • Search

  • Archives

    • October 2008 (4)
    • September 2008 (4)
    • August 2008 (10)
    • July 2008 (11)
    • June 2008 (14)
    • May 2008 (15)
    • April 2008 (10)
    • March 2008 (16)
    • February 2008 (17)
    • January 2008 (37)
    • December 2007 (21)
    • November 2007 (30)
    • October 2007 (29)
    • September 2007 (22)
    • August 2007 (30)
    • July 2007 (49)
    • June 2007 (32)
    • May 2007 (29)
    • April 2007 (38)
    • March 2007 (26)
    • February 2007 (25)
    • January 2007 (23)
    • December 2006 (10)
    • November 2006 (12)
    • October 2006 (9)
    • September 2006 (9)
    • August 2006 (5)
    • July 2006 (13)
    • June 2006 (9)
    • May 2006 (8)
    • April 2006 (11)
    • March 2006 (12)
    • February 2006 (12)
    • January 2006 (13)
    • December 2005 (15)
    • November 2005 (19)
    • October 2005 (8)
  • Categories

    • blather (63)
    • books (10)
    • computers (177)
    • cooking (1)
    • economics (3)
    • emacs (3)
    • football (1)
    • gaming (1)
    • hiking (5)
    • housekeeping (5)
    • lifehacking (7)
    • music (3)
    • paddling (2)
    • personal (1)
    • politics (21)
    • programming (70)
    • running (232)
    • smoking (40)
    • sysadmin (10)
    • tlc (10)
    • Uncategorized (1)
  • Pages

    • Current Schedule
    • Personal Records
    • Upcoming Races

Copyright © 2008 Running is therapy
WordPress Theme based on Light Theme