4 ms·
I was using this for a while; until I discovered the 'script' and 'scriptreplay' commands that come with most unix systems. You can start recording by running:
by daurnimator 11y ago
I was using this for a while; until I discovered the 'script' and 'scriptreplay' commands that come with most unix systems.
You can start recording by running: `script -t timingfile typescript`.
Your screen contents are recorded into the file `typescript` and the timing into `timingfile`.
You can play back by running: `scriptreplay -t timingfile typescript`
Check out the script man page for more cool things; like streaming live by using a fifo.
- cellover 11y agoYou made my day! Thanks for sharing this. I just had to tweak the recording command with the following to get it working properly: `script -ttimingfile typescript`. No space between -t and timingfile.
- masklinn 11y ago> You can start recording by running: `script -t timingfile typescript`. Your screen contents are recorded into the file `typescript` and the timing into `timingfile`. Beware `-t` it's a non-standard (as much as script is considered a standard) extension: * on OpenBSD there is no `-t` (or any other option aside from `-a` "append to existing typescript file") * on FreeBSD and OSX `-t` specifies the flush time interval (in seconds, defaulting to 30) (on FreeBSD > 9.2 `-r` will save IO and timing data) * on older linux distros it's a flag to output timing data to stderr And scriptreplay is linux-only, NetBSD 2 and FreeBSD can replay sessions with `script -p`
- baldfat 11y agoHow do you host the replay?
- kazinator 11y agoThere is a derivative of script called ttyrec. You can use that in conjunction with ttygif (https://github.com/icholy/ttygif https://github.com/icholy/ttygif) to make an animated gif out of the captured script.
- pierrec 11y agoscript and scriptreplay are awesome, but this isn't exactly the same thing. The docs clearly state "asciinema was inspired by script (and scriptreplay) commands". The magic of asciinema is all about playback in the browser. In fact you can combine the two, for example, you can play back a script file, and then playback the playback in asciinema: https://asciinema.org/a/7975 https://asciinema.org/a/7975 Now that I think about it, it would be cool if asciinema could directly load files created by script. I'm not sure if there's any difference between the two capture tools.