Nowadays, lots of people would use video to record a tutorial for demonstrating. It’s cool for vividly showing everything to people. The only issue is that file size of video is relatively large. From this point of view, the old way of recording actions from console might be a better idea.
script
and scriptreplay
are console recording/playing tools. script
would record time and actions of current session in two different files. And scriptreplay
would play those actions again in the console。 It’s quite easy to use these tools, just like the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
So the -t
would record the time and -a
would record actions to different files. In the command below, we also redirect the error message to timing.log
file.
And if we want to replay it, just use the scriptreplay
command, like this:
1
|
|
Then it would play what you have done before.
The thing you need to pay attention to is that such recording just happen in a session, so actions like switching user to do something would break that, to my understanding. Personally, I would use su user -c 'commands'
to solve this issue.
It might not be a feature used often times, but it probably would help if you want to share or show actions you’ve done to others.