Apps :: bash history log



Afaik the history buffer in bash is only appended to that "global" history file after the session is done.

There may be a config option somewhere to write at every command, or you could use another shell that does that by default (like busybox's ash iirc), but that won't really help you if you need to record the output as well.  There may be some logging options available though.

the 'script' application is made specifically to record everything that shows up on your screen.
script myscript.txt (Warning: Don't use the command "cat  myscript.txt" after starting the script :))

On a very old machine you will likely see a performance hit, mainly I think because it creates a subshell that is constantly recording everything happening in the original shell.  Ctrl+D stops the recording and closes the subshell.

ah, that application slipped my mind.  So yea, script should do what you want.

original here.