set terminal 80x10 set typedelay 100 set fps 30 sub prompt write user@host : $1 " $ " delay 500 endsub write "dd" " - convert and copy a file" write u{2500} *80 mark %top write Example 1: " Creating a disk image" prompt "~" type "dd " delay 1000 mark dd-if type "if=/dev/sdb " annotate @dd-if "Input file\n(Source)" at dd-if annotatelength @dd-if 11 delay 2000 mark dd-of type "of=image.img " annotate @dd-of "Output file\n(Destination)" at dd-of annotatelength @dd-of 12 delay 2000 mark dd-bs type "bs=16M " annotate @dd-bs "Block\nsize" at dd-bs annotatelength @dd-bs 6 delay 2000 mark dd-status type "status=progress " annotate @dd-status "Show progress" at dd-status annotatelength @dd-status 15 delay 2000 write delay 2000 clearannotate moveto %top clear to-bottom delay 500 write Example 2: " Create a file with empty data" prompt "~" type "dd " delay 1000 mark dd-if type "if=/dev/zero " annotate @dd-if "Reading from\n/dev/zero will\nreturn '0'\nindefinitely" at dd-if annotatelength @dd-if 12 delay 2000 mark dd-bs type "bs=1M " annotate @dd-bs "Block\nsize" at dd-bs annotatelength @dd-bs 5 delay 2000 mark dd-count type "count=100 " annotate @dd-count "Number of\nblocks to\ncopy:\n100*1M=100MB" at dd-count annotatelength @dd-count 9 delay 2000 mark dd-of type "> " annotate @dd-of "Without of= the output\nwill go to standard output,\nwhich can be redirected" at dd-of annotatelength @dd-of 1 delay 2000 type "empty.img" write delay 2000 clearannotate moveto %top clear to-bottom delay 500