ddÃüÁîµÄ½âÊÍ
dd£ºÓÃÖ¸¶¨´óСµÄ¿é¿½±´Ò»¸öÎļþ£¬²¢ÔÚ¿½±´µÄͬʱ½øÐÐÖ¸¶¨µÄת»»¡£
×¢Ò⣺ָ¶¨Êý×ֵĵط½ÈôÒÔÏÂÁÐ×Ö·û½á⣬Ôò³ËÒÔÏàÓ¦µÄÊý×Ö£ºb=512£»c=1£»k=1024£»w=2
²ÎÊý×¢ÊÍ£º
1. if=ÎļþÃû£ºÊäÈëÎļþÃû£¬È±Ê¡Îª±ê×¼ÊäÈë¡£¼´Ö¸¶¨Ô´Îļþ¡£< if=input file >
2. of=ÎļþÃû£ºÊä³öÎļþÃû£¬È±Ê¡Îª±ê×¼Êä³ö¡£¼´Ö¸¶¨Ä¿µÄÎļþ¡£< of=output file >
3. ibs=bytes£ºÒ»´Î¶ÁÈëbytes¸ö×Ö½Ú£¬¼´Ö¸¶¨Ò»¸ö¿é´óСΪbytes¸ö×Ö½Ú¡£
obs=bytes£ºÒ»´ÎÊä³öbytes¸ö×Ö½Ú£¬¼´Ö¸¶¨Ò»¸ö¿é´óСΪbytes¸ö×Ö½Ú¡£
bs=bytes£ºÍ¬Ê±ÉèÖöÁÈë/Êä³öµÄ¿é´óСΪbytes¸ö×Ö½Ú¡£
4. cbs=bytes£ºÒ»´Îת»»bytes¸ö×Ö½Ú£¬¼´Ö¸¶¨×ª»»»º³åÇø´óС¡£
5. skip=blocks£º´ÓÊäÈëÎļþ¿ªÍ·Ìø¹ýblocks¸ö¿éºóÔÙ¿ªÊ¼¸´ÖÆ¡£
6. seek=blocks£º´ÓÊä³öÎļþ¿ªÍ·Ìø¹ýblocks¸ö¿éºóÔÙ¿ªÊ¼¸´ÖÆ¡£
×¢Ò⣺ͨ³£Ö»Óõ±Êä³öÎļþÊÇ´ÅÅÌ»ò´Å´øʱ²ÅÓÐЧ£¬¼´±¸·Ýµ½´ÅÅÌ»ò´Å´øʱ²ÅÓÐЧ¡£
7. count=blocks£º½ö¿½±´blocks¸ö¿é£¬¿é´óСµÈÓÚibsÖ¸¶¨µÄ×Ö½ÚÊý¡£
8. conv=conversion£ºÓÃÖ¸¶¨µÄ²ÎÊýת»»Îļþ
ascii£º×ª»»ebcdicΪascii
ebcdic£º×ª»»asciiΪebcdic
ibm£º×ª»»asciiΪalternate ebcdic
block£º°ÑÿһÐÐת»»Îª³¤¶ÈΪcbs£¬²»×㲿·ÖÓÿոñÌî³ä
unblock£ºÊ¹Ã¿Ò»Ðеij¤¶È¶¼Îªcbs£¬²»×㲿·ÖÓÿոñÌî³ä
lcase£º°Ñ´óд×Ö·ûת»»ÎªÐ¡Ð´×Ö·û
ucase£º°ÑСд×Ö·ûת»»Îª´óд×Ö·û
swab£º½»»»ÊäÈëµÄÿ¶Ô×Ö½Ú
noerror£º³ö´íʱ²»Í£Ö¹
notrunc£º²»½Ø¶ÌÊä³öÎļþ
sync£º½«Ã¿¸öÊäÈë¿éÌî³äµ½ibs¸ö×Ö½Ú£¬²»×㲿·ÖÓÿգ¨NUL£©×Ö·û²¹Æë¡£
¶þ¡¢ddÓ¦ÓÃʵÀý
1.½«±¾µØµÄ/dev/hdbÕûÅ̱¸·Ýµ½/dev/hdd
#dd if=/dev/hdb of=/dev/hdd
2.½«/dev/hdbÈ«ÅÌÊý¾Ý±¸·Ýµ½Ö¸¶¨Â·¾¶µÄimageÎļþ
#dd if=/dev/hdb of=/root/image
3.½«±¸·ÝÎļþ»Ö¸´µ½Ö¸¶¨ÅÌ
#dd if=/root/image of=/dev/hdb
4.±¸·Ý/dev/hdbÈ«ÅÌÊý¾Ý£¬²¢ÀûÓÃgzip¹¤¾ß½øÐÐѹËõ£¬±£´æµ½Ö¸¶¨Â·¾¶
#dd if=/dev/hdb | gzip > /root/image.gz
5.½«Ñ¹ËõµÄ±¸·ÝÎļþ»Ö¸´µ½Ö¸¶¨ÅÌ
#gzip -dc /root/image.gz | dd of=/dev/hdb