This post appeared originally in our sysadvent series and has been moved here following the discontinuation of the sysadvent microsite
Ever wanted to record a log of an interactive console session? Easy, just use
the script
utility. It’s probably already present on your system, no
installation required.
To start recording, run script --timing=script.tim script.log
. This spawns a
new shell, recording stops when you exit from it.
To replay the log, run scriptreplay script.tim script.log
. It is also
possible to speed up or slow down the playback speed. For example, in order to
play back the recording at half of the original speed, use scriptreplay
script.tim script.log 0.5
. Ctrl+S
pauses the playback, Ctrl+Q
resumes.
The nice thing about script
is that it records everything that happens on the
console, it’s not just a simple log of invoked commands. If you open a text
editor like vi
in the recorded session, you’ll be able to see exactly how and
where you navigate the cursor, exactly how and when text was changed -
including any typos that were later corrected, and so on.
For the full documentation, check out the manual pages script(1) and scriptreplay(1).
Comparison of different compression tools
Working with various compressed files on a daily basis, I found I didn’t actually know how the different tools performed compared to each other. I know different compression will best fit different types of data, but I wanted to compare using a large generic file.
The setup
The file I chose was a 4194304000 byte (4.0 GB) Ubuntu installation disk image.
The machine tasked with doing of the bit-mashing was an Ubuntu with a AMD Ryzen 9 5900X 12-Core ... [continue reading]