If your Terminal is losing the history (previously entered commands), try this:
Check first, in your home directory, who owns the file .bash_history (do not type the $)
$ ls -al .bash_history
If for some reason the file is not owned by your username, will appear (for example) in the listing as:
-rw------- 1 root staff 32 Jul 11 2011 .bash_history
Fix it with (do not type the $)
$ sudo chown [username] .bash_history
(source: http://www.paulmc.org/2009/01/enable-bash-history-in-terminal/ )
Now close Terminal, open it again and you should be capable of seeing previously entered commands by pressing the up arrow (that is, if you're using bash as your Terminal shell - - the default).