When using the command line, like Terminal for Mac OS X there are two quick ways to recall a command you entered previously. By using the Up & Down arrow keys on the keyboard allows you to scroll through your command history. When a command is much older than a minute or two ago then a auto-complete search is possible by pressing the
Ctrl+R keys together and typing in any portion of a previous command. The auto-complete search is way cool; give it a try.
If you need to learn how to use Terminal for Mac OS X then I suggest you check out the online excerpt series Learning the Mac OS X Terminal or watch "Chapter 12. The Terminal" of Mac OS X 10.5 Leopard Beyond the Basics (which is still relevant for Mac OS X 10.6 "Snow Leopard" or higher).