$Echo
$Echo gives a list of files and pipes to which all input is echoed.
You can use $Echo to keep a file of all your input commands. See The Mathematica Book: Section 2.13.1.