2021-02-02 17:08:15 +00:00
|
|
|
set terminal 80x10
|
|
|
|
set typedelay 100
|
2021-02-01 15:20:42 +00:00
|
|
|
set fps 30
|
|
|
|
|
|
|
|
sub prompt
|
|
|
|
write <home> <sgr fg:green bold> user@host <sgr> : <sgr fg:blue bold> $1 <sgr bold> " $ " <sgr>
|
|
|
|
delay 500
|
|
|
|
endsub
|
|
|
|
|
2021-02-02 17:08:15 +00:00
|
|
|
write <sgr bold> "dd" <sgr> " - convert and copy a file" <return>
|
|
|
|
write u{2500} *80 <return>
|
|
|
|
|
|
|
|
mark %top
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
write <sgr fg:cyan bold> Example 1: <sgr fg:cyan> " Creating a disk image" <sgr> <return> <return>
|
2021-02-01 15:20:42 +00:00
|
|
|
prompt "~"
|
|
|
|
|
|
|
|
type "dd "
|
2021-02-02 17:08:15 +00:00
|
|
|
|
|
|
|
delay 1000
|
|
|
|
|
2021-02-01 15:20:42 +00:00
|
|
|
mark dd-if
|
|
|
|
type "if=/dev/sdb "
|
2021-02-02 17:08:15 +00:00
|
|
|
annotate @dd-if "Input file\n(Source)" at dd-if
|
2021-02-01 15:20:42 +00:00
|
|
|
annotatelength @dd-if 11
|
2021-02-02 17:08:15 +00:00
|
|
|
delay 2000
|
|
|
|
|
2021-02-01 15:20:42 +00:00
|
|
|
mark dd-of
|
|
|
|
type "of=image.img "
|
2021-02-02 17:08:15 +00:00
|
|
|
annotate @dd-of "Output file\n(Destination)" at dd-of
|
2021-02-01 15:20:42 +00:00
|
|
|
annotatelength @dd-of 12
|
2021-02-02 17:08:15 +00:00
|
|
|
delay 2000
|
|
|
|
|
2021-02-01 15:20:42 +00:00
|
|
|
mark dd-bs
|
|
|
|
type "bs=16M "
|
|
|
|
annotate @dd-bs "Block\nsize" at dd-bs
|
|
|
|
annotatelength @dd-bs 6
|
2021-02-02 17:08:15 +00:00
|
|
|
delay 2000
|
|
|
|
|
2021-02-01 15:20:42 +00:00
|
|
|
mark dd-status
|
|
|
|
type "status=progress "
|
|
|
|
annotate @dd-status "Show progress" at dd-status
|
|
|
|
annotatelength @dd-status 15
|
2021-02-02 17:08:15 +00:00
|
|
|
delay 2000
|
2021-02-01 15:20:42 +00:00
|
|
|
|
|
|
|
write <return>
|
|
|
|
|
2021-02-02 17:08:15 +00:00
|
|
|
delay 2000
|
|
|
|
|
|
|
|
clearannotate
|
|
|
|
moveto %top
|
|
|
|
clear to-bottom
|
|
|
|
delay 500
|
|
|
|
|
|
|
|
|
|
|
|
write <sgr fg:cyan bold> Example 2: <sgr fg:cyan> " Create a file with empty data" <sgr> <return> <return>
|
2021-02-01 15:20:42 +00:00
|
|
|
prompt "~"
|
|
|
|
|
2021-02-02 17:08:15 +00:00
|
|
|
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
|
2021-02-01 15:20:42 +00:00
|
|
|
delay 2000
|
|
|
|
|
2021-02-02 17:08:15 +00:00
|
|
|
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
|
2021-02-01 15:20:42 +00:00
|
|
|
|
2021-02-02 17:08:15 +00:00
|
|
|
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 <return>
|
|
|
|
|
|
|
|
delay 2000
|
|
|
|
|
|
|
|
clearannotate
|
|
|
|
moveto %top
|
|
|
|
clear to-bottom
|
|
|
|
delay 500
|
2021-02-01 15:20:42 +00:00
|
|
|
|