Command history
If you're new here, you may want to subscribe to my RSS feed.
Besides tab completion, another way to cut down on the amount of typing you do in Unix is the history command. Open Terminal, type history and press Enter. You’ll see a list of Unix commands you previously typed. If you’d like to rerun a command you previously used, you could of course Copy and Paste, or you can type an exclamation point (!) and the number of the command. For instance, if you see that the 10th command in your history is ls -al and you want to run it again, you can type !10 and that command will be re-executed.
If you want to simply rerun the last command, you can type !!.
You can also scroll through the command history by pressing the Up and Down arrows at a blank prompt. As soon as you find a command you want to rerun, you can edit it as needed or simply press Enter.

November 16th, 2006 at 7:10 pm
You can also
catout your~/.bash_history, to see all of your archived commands you used.November 22nd, 2006 at 2:59 am
More lessons please!