OK, this is so cool and sexy, I really don't understand how I didn't find about this earlier. Possibly because it's the recent add-on to the well known
So, I suppose you all know about
script. You type
script, do your work, type exit, and you have your complete session logged in the file named
typescript. Quite handy if you want to log everything you did in the shell for whatever reasons.
What you might not know is that
script has an interesting switch which allows you to also save the exact timing data of the screen output you're capturing. And an additional utility called
scriptreplay which can later replay your session in real-time. Like a movie. With perfect timing.
It works like this:
% script -t 2> demo.timing -a demo.session
Script started, file is demo.session
% <do something>
Script done, file is demo.session
And later you replay your session like this:
% scriptreplay demo.timing demo.session
This looks like a perfect tool for short tutorials of things that need to be done in the shell prompt. To check this fact, I've attached session of a small tutorial, how to enable process accounting in Ubuntu, find it attached below (only 2KB download). Unpack it and run like this:
% tar xvzf acct-scriptreplay.tgz
% scriptreplay acct.timing acct.session
What do you think? Is it useful?