Which of the following commands will copy one disk partition /dev/sda3 to /dev/sdb3?
A.
dd if=/dev/sdb3 of =/dev/sda3 bs=4096 conv=notrunc
B.
dd if=/dev/sda3 of=/dev/sdb3 bs=4096 conv=notrunc
C.
dd --input /dev/sda3 --output /dev/sdb3 bs=4096 conv=notrunc
D.
dd --input /dev/sdb3 --output /dev/sda3 bs=4096 conv=notrunc
题解
「dd」指令可以用来转换或是拷贝文件。「bs」参数为每次写入的字节数量。「if」参数为来源文件,可以是设备文件。「of」参数为目的文件,可以是设备文件。「conv」参数可以转换编码,「noerror」可以让读取出错时不会停止,「notrunc」只对输出的目标是文件时才有效,可以让 dd 不要先截断(truncate)输出文件,而是从开头(或「seek」指定的位置)直接覆写数据,并保留后面没有被覆写到的内容。
所以正确答案是选项 B。
