info
-
dd
command copies a file-
converting the format of the data in the process
-
according to the operands specified
-
operands
-
bs
read and write bytes at a time-
ibs
read bytes at a time (default 512) -
obs
write bytes at a time (default 512)
-
-
cbs
convert bytes at a time -
conv
comma separated symbol list -
count
copy only input blocks -
if
read from file instead of stdin -
of
write to file instead of stdout
demo
-
-
create a iso disc image from cd
$ dd if=/dev/sr0 of=/home/hope/example.iso bs=2048 conv=noerror,sync
-
create an img file of
/dev/sda
hard drive$ dd if=/dev/sda of=~/disk1.img # restore that image $ dd if=disk1.img of/dev/sda
-
copy contents
$ dd if=/dev/sda of=/dev/sdb
-
-
-
create a startup usb from a hybrid image
# !!!!! # warning: make sure to set the correct device path # as this process will delete all data # that was on the specified device previously # !!!!! # don't include an integer for the usb drive # e.g. `/dev/sdx1` as it would refer to # `the existing partition` on the drive # not the drive itself $ dd if=~/Desktop/ubuntu-15.04-desktop-amd64.iso of=/dev/sdx oflag=direct =1048576 # figure out the target usb drive path $ fdisk -l
-
-
-
convert a
dmg
file toiso
$ hdiutil convert imagefile.img -format UDTO -o converted.iso
-
convert an
iso
todmg
$ hdiutil convert converted.iso -format UDRW -o imagefile.img
-