Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm looking to see if there is some smooth way (that is, not me just writing a wrapper for the shell) to get full logs of both everything I enter into the command-line shell and everything that gets output. Often I tinker a lot with various softwares, and this seems like it'd be a nice way to trace my steps back.

I use zsh, but I'm welcome to solutions even if they happen to be bash (or some other shell) specific.

Thanks!

share|improve this question
    
if its just input, the 'history' command is great –  Journeyman Geek Mar 17 '13 at 5:34

4 Answers 4

You might be looking for ttyrec which records the input and output of the entire console session, and allows you to play it back.

share|improve this answer

Look into sudosh. A link to the SourceForge page is: HERE

(There may even be a package, depending on your repos/disto)

You can "sudosh" into a shell and everything is recorded for that session. All sudosh sessions are recorded and saved with a date and time stamp appended to it automatically.

(You can even grep/search the contents of the sudosh recording)

You can then use sudosh-replay to play back a recording of the shell session, just like you were watching it happen in real time.

share|improve this answer

You could use screen (or tmux) and enable logging.

screen -L
share|improve this answer

script does what you want.

Script makes a typescript of everything printed on your terminal.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.