9.2.1: 命令 - dd



1. dd

作用:Copy a file, converting and formatting according to the operands.

语法:dd 参数

参数:

# dd命令创建一个指定容量大小的文件
dd if=/dev/zero of=destfile bs=10M count=1
1+0 records in
1+0 records out
10485760 bytes (10 MB) copied, 0.00720787 s, 1.5 GB/s

# dd命令复制文件
dd if=./destfile of=destfile2 bs=5M
2+0 records in
2+0 records out
10485760 bytes (10 MB) copied, 0.0148796 s, 705 MB/s

# dd命令制作iso镜像
dd if=/dev/sr0 of=centos6.7.iso
808960+0 records in
808960+0 records out
414187520 bytes (414 MB) copied, 7.50537 s, 55.2 MB/s

# cp命令制作iso镜像
cp /dev/sr0 centos6.7-2.iso