|
dd
- The correct title of this article is dd (Unix). The initial letter is capitalized due to technical restrictions.
dd is a common Unix program whose primary purpose is the low-level copying and conversion of files. Some have suggested that it stands for Copy and Convert, but since "cc" was already in use as the code for the C Compiler, "dd" was used instead; in any case, DD is a shorthand for "data definition" in IBM JCL (to which the command's syntax bears a strong resemblance) and the name and syntax of the command is generally presumed to be a bit of gallows humor.
dd has a different set of command line options than the ordinary cp command (which copies files in their entirety) that allow copying a fixed number of bytes or blocks, performing on-the-fly byte order conversions, as well as more esoteric EBCDIC to ASCII conversions. Nowadays dd is mostly used to copy regions of raw device files, e.g. backing up the boot sector of a hard disk, or to read fixed amounts of data from special files like /dev/zero or /dev/random. Because dd can copy entire partitions or disks (this is more due to Unix providing access to these devices than the functionality of dd per se), it is used in computer forensics when the contents of a partition need to be preserved in a byte-exact copy. Using cp would not be enough, since data from deleted files that may still be present on a disk are not visible through the file system interface. It is jokingly said to stand for "destroy disk" or "delete data", since, being used for low-level operations on hard disks, a small mistake, such as reversing the if and of parameters, may accidentally render the entire disk unusable.[1]
The command line syntax of dd is unlike that of any other Unix program; a violation of the Unix philosophy of using a common syntax for all command line tools. Generally, dd uses an option=value format, whereas most Unix programs use a -option value format. Also, dd's input is specified using the "if" (input file) option, while most programs simply take the name by itself. It is rumored to have been based on IBM's JCL, and though the syntax may have been a joke, there seems never to have been any effort to write a more Unix-like replacement.
|
Contents
- 1 Usage
- 1.1 operands
- 1.2 conv
- 1.3 Notes and units
- 2 Examples
- 3 Anti-examples
- 4 See also
- 5 External links
|
Usage
dd [options]
operands
- if=file
- Input File: Read from file instead from standard input.
- of=file
- Output File: Write to file instead to standard output. See also the keyword notrunc.
- ibs=bytes
- Input Block Size: Read bytes bytes at once.
- obs=bytes
- Output Block Size: Write bytes bytes at once.
- bs=bytes
- Block Size: A shortcut for ibs=bytes obs=bytes. If the user does not provide a block size, 512 bytes is used[2].
- count=blocks
- Count: copy only this many blocks from the input to the output, then stop.
- skip=blocks
- When starting to read from input, skip blocks number of blocks of size ibs.
- seek=blocks
- When starting to write to output, skip blocks number of blocks of size obs.
- conv=keywords
- Convert the file according to a comma-separated list of keywords.
- cbs=bytes
- Convert Block Size: Convert bytes bytes at once.
conv
When specifying conv as parameter the following keywords may be used:
- ascii
- Convert from EBCDIC to ASCII.
- ebcdic
- Convert from ASCII to EBCDIC.
- ibm
- Convert from ASCII to an alternative EBCDIC.
- block
- Fill datasets which are terminated by a newline-character with space-characters to fit size of cbs.
- unblock
- Replace trailing space-characters in datasets of size cbs with newline-characters.
- lcase
- Change uppercase characters to lowercase.
- ucase
- Change lowercase characters to uppercase.
- notrunc
- Do not truncate output file to zero bytes before writing to it. If the existing output file is shorter than the amount of data to be written to it, this will cause the written data to overwrite the initial portion, leaving the remainder intact.
- swab
- Swap every pair of input bytes.
- noerror
- Ignore reading errors and continue.
- sync
- Pad every input block with null bytes if it is shorter than the size specified. If used with block or unblock, pad with space characters instead.
Notes and units
On various systems the option --version is supported. dd will then output its version number and quit.
file may be any real file or any block-device file.
On certain systems bytes may be specified with multiplicative units. This units may then be[3]:
- c
- Character: 1
- w
- Word: 2
- b
- Block: 512
- kB
- Decimal kilobytes: 1,000 bytes
- k
- Binary kilobytes (kibibytes): 1,024 bytes
- MB
- Decimal megabytes: 1,000,000 bytes
- M
- Binary megabytes (mebibytes): 1,048,576 bytes (1,024×1,024)
This may be carried on similarly with G, T, P, E, Z, Y. The standard "IEEE Std 1003.1" only requires that the 'b' and 'k' multipliers be supported, and does not specify the meaning of any other multipliers. Also, multiple numbers may be provided separated by 'x'. These numbers are multiplied together.
Examples
To create an image file named floppy.img of a floppy disk in the drive whose block-device name is /dev/fd0 (as the first floppy device is on Linux), one may invoke dd in the following way:
dd if=/dev/fd0 of=floppy.img
Note: To copy a floppy image to a disk (erasing any existing data on the disk), simply reverse of and if of the previous example.
To create a file with name reallylargefile with the size of 1 GB, filled with random data, do this (1G = 1073741824, 1073741824 / 512 = 2097152 (the default block size is 512)):
dd if=/dev/random of=reallylargefile count=2097152
To fill the file with NULL characters, use /dev/zero instead of /dev/random. This can be used to mount a filesystem if you have a FAT32 device, but need the flexibility of EXT2 - as follows:
dd if=/dev/zero of=my.new.virtual.harddisk count=10G
mke2fs my.new.virtual.harddisk (reply yes when it says it's not a block device)
mkdir /mnt/virtual
mount -o loop my.new.virtual.harddisk /mnt/virtual/
To increase writing performance obs can be increased:
dd if=/dev/random of=reallylargefile obs=4096
This will write the first partition of the first harddisk to the file mywindowspartition.image.
dd if=/dev/hda1 of=mywindowspartition.image
These examples are Linux-centric: on other platforms the device names may be different.
For many more examples of the Linux dd command, which is the same as the UNIX version, go here: http://www.linuxquestions.org/questions/showthread.php?t=362506
Anti-examples
WARNING: Do NOT try these examples; they will destroy data!
The following examples are provided to warn about the dangers of dd, if used incorrectly. Trying any of these commands with the proper privileges will almost certainly result in major data loss, and may make the system unusable.
This overwrites the complete first hard disk with null bytes, erasing it (do that if you want to sell a hd, that contained company secrets, though this is not really secure):
dd if=/dev/zero of=/dev/hda
This overwrites the first few blocks of the first hard disk with the file, resulting in a loss of the partition table:
dd if=funnysong.mp3 of=/dev/hda
This will completely corrupt an entire hard disk (/dev/dsp is the sound player/recorder):
dd if=/dev/dsp of=/dev/hda
This will overwrite an entire disk with pseudorandom data, making its initial contents irrecoverable
dd if=/dev/urandom of=/dev/hda
These examples are Linux-centric. On other platforms the device names may be different.
See also
External links
- The Open Group Base Specifications Issue 6 of the dd utility
- dd for Windows
- User group post on using DD
- Wonders of 'dd' and 'netcat' :: Cloning Operating Systems - Several examples of use
- Cloning Hard Drives with GNU/Linux
|
|
dd news and dd articles
Here's our top rated
dd links for the day:
Northfield resultsLegend: DD-daily double; Ex-exacta; Tri- trifecta; Spr-superfecta. 1st: Pace $2,000 3000CLCD Off: 7:09
The Plain Dealer - Nov 16 4:42 AM © 2006 The Plain Dealer. Used with permission. Receive 2 weeks FREE delivery of The Plain Dealer for complete Cavaliers coverage! Sign up now!Save
Win an Ashes DVD double!
Daily Mail - Nov 15 7:58 AM As Ashes expectation reaches fever-pitch The Mail online has teamed up with DD Home Entertainment to offer 20 winners a pair of DVDs guaranteed to whet the appetite for the contest ahead. All you have to do is answer a simple question Save
Dalian High Tech industrial zone commission inks US$250 mln deal
Antara News - Nov 16 7:56 PM (Full text of a statement. Contact details below.)Save
More News
The Citizens' Voice - Nov 15 12:29 AM The Lt. Chester F. Strzalka Veterans of Foreign Wars Post 8353 will meet Tuesday at 7 p.m. in the meeting room of the American Legion Post 539, 62 Newport Street, Glen Lyon. New memberships will be accepted. Prospective members should bring DD 214 forms.Save
Jodka sentenced to 18 months for his role in Hamdania killing
North County Times - Nov 16 7:22 PM CAMP PENDLETON -- An apologetic Marine private who faced as much as 15 years in prison was sentenced Wednesday to 18 months in the brig with credit for six months already served and will be discharged from the service for his role in the killing of a retired Iraqi policeman in April.Save
Thank you for viewing the
dd page
dd.
cd ddd ed dc de sd ds df da bd db fd
|
|
Ever wondered what others are searching for in relation to
dd? Now you can see. Below is a listing of
what everyone else is searching for in regard to dd.
1. dd 2. dd motorcycle exhaust 3. dd blanchard southern magnolia 4. dd blanchard magnolia 5. 36 dd 6. dd cup 7. dds 8. dd babe 9. dd form 1351-2 10. dd heartbreakers 11. dd 214 12. 34 dd 13. dd 1351-2 14. 38 dd 15. eden dd 16. dd forms 17. dd form 1172-2 18. loving dd blog 19. dd cup hangers 20. women with 36 dd breast 21. dd bra 22. dd cups 23. miss dd 24. dd 1351 25. omg dds 26. dd bras 27. eden 38 dd 28. natural dd 29. dds data distribution service 30. dd form 1348-1 31. dd heartbreaker 32. 40 dd 33. 44 dd 34. download dds for free 35. sherman dd tank 36. dd 1155 37. dd 1348-1 38. dd cup bra 39. dd women 40. dd babes 41. dd bikinis 42. dd underwire tankini 43. bikinis dd 44. dd swimsuits 45. 42 dd 46. dd 1149 47. dd lingerie 48. jody jones dds 49. 32 dd 50. dennis r bailey dds 51. miraclesuit 18 dd 52. dd 1556 53. dd 250 54. dd 2621 55. dd exhaust 56. dd movies 57. magnolia, dd blanchard 58. beverly morris dds 59. double dd 60. dd bikini 61. g1 m desc dd 62. joel lane smith, dds 63. bikini dd cup 64. dd bikini tops 65. dd swimwear 66. dd wrt 67. georgia dds 68. daniel theberge, dds 69. dd 1348 70. dd alvarez 71. dd blonde 72. dd implants 73. dds heartbreakers 74. florida dd 75. miss dd 3 76. dd 200 77. dd 2875 78. dd cup sizes 79. dd form 80. fischer charles curt dds 81. what does dds stand for 82. 46 dd 83. carlos morales-ryan dds 84. dd form 217 af 85. edwards center dd vocational and residential training 86. miraclesuit dd 87. miss dd comics 88. dds discounts 89. dds program after high school 90. jeffrey g robinson dds 91. john c. britton, dds 92. mark amidei, dds 93. michael van dds 94. natasha dd 95. richard wetherill dds 96. benva lazar, dds 97. blonde dd 98. david wooten, dds 99. dd 1172 100. dd computer chipcomputer chips 101. dd form 1172 sep 2005 pdf 102. dd form 200 financial liability investigation power point 103. dd power amp music converter 104. francis madamba, dds 105. grass valley kayak dd 106. gregory m. solich, dds 107. ira shapira, dds 108. james swenson, dds 109. jeffrey rice, dds 110. john napolitano, dds 111. linux dd 112. paul litvin, dds 113. randall hayashi, dds 114. thomas r. miller, dds 115. what does a 38 dd look like 116. at dds 117. clifford avant dds 118. dd 1172-2 119. dd 200 financial liability investigation 120. dd 254 121. dd linux 122. dd shelf bras 123. digital design dd 124. dr keith ogawa dds 125. john c noakes dds 126. jordan l. soll, dds 127. kent m. johnson, dds 128. ramine nabizadeh, dds 129. reinitz dds 130. shaun dowd dds 131. steven v. white, dds 132. vera varadi, dds 133. 32 dd bras 134. 48 dd 135. ada tiller, dds 136. alex pavlenko, dds 137. asian dd 138. charles a. varipapa, dds 139. dd 2766 140. dd command 141. dd form 2220 motorcycles 142. dd mp3 143. dds converter 144. hab waiver requirements for dd 145. hilti dd 130 core drill 146. hyneman dds az 147. jordan soll dds 148. mark duncan, dds 149. niyati patel dds 150. robert l williamson iii, dds 151. sony dds 152. xerox 8830 dds tips 153. xiao quan shu dds 154. allan d. gross dds 155. bikini tops for dd 156. brandy dd 157. brit bowers, dds 158. david rozzen, dds 159. dd 2173 160. dd for windows 161. dd galleries 162. dd granny 163. dd home entertainment 164. dd mature 165. dd power converter 166. dd sound mp3 167. dds for a dentist 168. irving i. cohen, dds 169. james shubert dds 170. k. kevin pulver, dds 171. lee & oh dds 172. lenco 830 dd 173. manuel r seage dds 174. my dd 175. naas dds 176. norma miranda dds 177. patricia clark dds 178. perfect 40 dd 179. r tafel dds 180. robert g berman dds 181. ryan brewster dds 182. sherman tank dd 183. size dd 184. solaris dd command 185. staff dds 186. temecula dental and niyati patel dds 187. wayne sutton dds 188. women with dd 189. ashish rastogi dds 190. bowen dds 191. catrise austin dds 192. charles r. clater jr, dds 193. college guy dd 194. cup dd 195. dd 1561 196. dd dolls 197. dd flowers 198. dd form 4 199. dd form1351-2 200. dd indian chief rubber stamps 201. dd janda mp3 202. dd jugs 203. dd moms 204. dd size 205. dds extension 206. difference between dds and dmd 207. dr wilson dds 208. er-jia mao, dds 209. gary wesson dds 210. gina lynn dds & derrieres 211. guy phillips dds pa 212. info http maps yahoo com dd resu 213. j. david collier dds 214. james hicks dds 215. james merrell dds ohio 216. james v. d'alise, dds 217. lenco 833 dd 218. michael greenberg, dds 219. miss dd comic 220. robert csillag, dds 221. sandusky w cooper ms iii dds 222. scott ryan dds 223. skinny dd 224. sterckeman starlett 430 dd 225. 18 dd 226. 33 dd 227. 36 26 36 dd 228. 40 cfr 23 subpart dd 229. 72 dd cup size 230. bra size 36 dd 231. bradley c rule dds 232. bras dd 233. brit e bowers, dds 234. caporal dd 235. charles kaner, dds - periodontist 236. chris williams, dds 237. class on dd 200 financial liability investigation 238. complaints leroy carson dds 239. david s. ainsworth, dds 240. dd 1556 word 241. dd 1586 242. dd 1750 243. dd 200 financial liability investigation powerpoint 244. dd 214 separation codes 245. dd 217 af 246. dd 650 247. dd digital design 248. dd drawings 249. dd form 214 codes 250. dd form 2208 word 251. dd picks 252. dd shaft 253. dd slingshot bikini 254. dd tops 255. dds 304-2 256. dds nancy hartrick 257. dds surge protection requirements 258. dell latitude cpx h500gt 500 mhz 128 mo ram dd 259. dr bradley rule dds 260. dr graham dds marble falls 261. dr nicole lecann dds 262. dr sharon cobham dds 263. dr. isaac yankem, dds 264. eden 38 dd pics 265. gary bourgeois dds nm 266. j. christopher williams, dds 267. james listzwan, dds 268. joseph trapani dds 269. julia diaz dds texas 270. lester laraway dds 271. mark neale dds 272. martha gutierrez dds 273. mature dd 274. melinda marino and dds 275. miraclesuit? dd cup 276. national semiconductor dds 277. neal b. richter dds 278. neil melker dds 279. patrick farrell dds 280. paul olenyn dds 281. regulation dd 282. restaurant vocational training for dd 283. richmond dds 284. robert allen dds 285. shahram haghighat dds 286. shana d dean dds 287. size 32 dd bikini 288. spencer baum, dds 289. stacy smaltz, dds 290. swimsuit sale dd 291. title 10 and reserves and dd form 4 292. troy schmedding dds 293. wook s kim, dds orland park, il 294. worton dds 295. 36 dd cup 296. 38 dd bikini 297. 39 dd 298. 5' 5 105 38 dd blonde 299. anime dd 300. atapi dvd dd driver 301. bare dd 302. bb dd allele 303. bound dd 304. bradley j olson dds 305. bridget powers dds 306. brunette dd 307. build dds signal generator 308. catrolla, dds 309. christian dd 310. christina bartsch dds 311. chuck hoopingarner, dds 312. clater jr, charles r, dds 313. dd 1348 1a 314. dd 1387 instructions 315. dd 200 financial liablity investigation of property loss 316. dd 214 document 317. dd 214 spn codes 318. dd 2332 319. dd 256 320. dd 2579 321. dd 293 322. dd 368 323. dd 93 324. dd and win 325. dd anime 326. dd cup bathing suitssunsets seperates 327. dd cup women 328. dd elite boxng 329. dd form 1351 2 word 330. dd form 1351-1 331. dd form 1351-2 in ms word format 332. dd form 1351-5 in word 333. dd form 137-3 334. dd form 2621 word 335. dd form 2656-9 336. dd form 2a 337. dd form 98 loyalty certificate 338. dd gals 339. dd mamas 340. dd parent directory 341. dd symbol 342. dd underwire bandeau 343. dd underwire bikini 344. dd womens bathingsuits 345. dd womens bikinis 346. dds 32 print drivers 347. dds 671-1 348. dds discount store 349. dds prtf line counter 350. dds system 351. dexter dd 352. dr butler dds san diego 353. dr grahm dds marble falls 354. dr isaac yankem, dds pics 355. dr. carey dds houston 356. dr. edward taylor, dds 357. dr. james ramsey, dds in houston, tx 358. dr. manisha javia dds 359. dr. robert a. parrish, dds 360. eric j smith, dds 361. florida dd council white papers 362. fred quarnstrom dds seattle 363. gary g. eggers, dds 364. gilirain & brooks dds 365. greddy dd 366. heath jones dds 367. home information packs dd - dundee 368. hugh douglas dds 369. isaac yankem, dds 370. jaime vergara dds 371. james muglia dds 372. john noakes dds 373. john popenoe, dds 374. john williamson dds san leandro 375. joseph a. maloney dds waldorf 376. julia r dds 377. karl lind, dds 378. kenneth jacobs dds 379. lauren t phan dds endodontics 380. mark wright dds colorado 381. martin schroeder, dds pa 382. michael king dds 383. michael oswald, dds 384. point to point dds 385. republic of columbia ?schools for dds 386. richard loochtan dds 387. rima peters dds in az 388. robert williamson iii, dds 389. salisbury, dds 390. samuel h ko dds 391. shawn gurley, dds 392. soltero, dds 393. sonia jennings dds 394. stacy waddell dds 395. tankinis for dd cup 396. terry bass dds 397. todd lund, dds 398. treharne dds minnesota 399. wendy s woodall, dds 400. why matthew c. nolen, dds ? revoked, december 16, 2003. 401. xerox 8825 dds 402. 16 dd swimsuit 403. 34 dd blonde 404. 40 dd long line strapless 405. 52 dd bras 406. aaron m soeprono dds 407. am 40 dd 408. amanda dd cup 409. anita myers dds 410. anthony vondra, dds 411. anton j degeus dds 412. army dd form 1131 will be file for 413. ashish arya dds 414. az dd 415. backup using hp dds tapes 416. barry keogh dds 417. barry solomon dds 418. behringer dd 100 digital delays 419. berry s cole dds 420. betsy bakeman dds 421. big dd 422. bill coleman dds 423. bill grammer dds 424. biopsychosocial approach with dd 425. bra 54 dd 426. bra dd 427. break region codes for dds 428. breck magill dds elkhorn 429. brian t cave dds 430. bruce smolner, dds 431. bryan g. judd dds 432. burr bakke dds 433. c r hoopingarner dds 434. carmel indiana yang catherine dds 435. catherine yu lan yang dds 436. certificate of promotion, dd form 1 437. charles f rodgers dds 438. charles hagan, dds 439. charles martin dds 440. charles west dds marion,il. 441. chris root dds 442. christopher kondas dds 443. connor dds chillicothe 444. copying dds 445. craig d williams, dds 446. craig williams, dds 447. crochet bikinis for dd 448. dale stringer dds 449. daniel j beninato dds 450. daniel solomon dds 451. david boyd dds 452. david miller dds north carolina 453. david resnick, dds 454. david star dds 455. dd 1155, block 7 456. dd 1351 regulation 457. dd 1351-2 travel voucher 458. dd 1351-2c 459. dd 137-1 460. dd 138 461. dd 1390s 462. dd 214 codes 463. dd 214 free copy 464. dd 214 on line 465. dd 214 online 466. dd 2332 pdf 467. dd 2501 468. dd 256a 469. dd 2860 470. dd 2895 471. dd 368 form 472. dd 40 473. dd 44 474. dd 750 x 475. dd batteries 476. dd bikini contest 477. dd biniki 478. dd bra babes 479. dd bras gallery 480. dd cup bras 481. dd cup swinwear 482. dd discount stores 483. dd diskdump 484. dd f 3148-1 485. dd file + yokogawa transmitter 486. dd for 1348-1 487. dd form 1172 civilian id card 488. dd form 1352 travel voucher 489. dd form 1352-2 in ms word 490. dd form 1361-2 491. dd form 1574 instruction 492. dd form 200 navy 493. dd form 200 power point 494. dd form lost stolen property 495. dd lewis 496. dd news reader 497. dd palmer 498. dd reps 499. dd scarlets 500. dd sherri
|
|
|