37 ms·
Isn't dd "disk duplication"?
by dghughes 6y ago
Isn't dd "disk duplication"?
- tenebrisalietum 6y agoIt shouldn't be because it will work with normal files just fine. E.g. if you want to image a disk, `dd if=/dev/sdc of=sdc.img` and silly things like `dd if=/etc/passwd of=/root/~passwd` work too. Also it has a convert function so it's not strictly just for duplication.
- jxcl 6y agoOr if swap your of and if arguments, disk destroyer. :)
- soneil 6y agoYou'd think so, since that's the main thing it's used for anymore. But check the output of --help. Changing case, ascii to ebcdic, doesn't really fit the bill.
- saalweachter 6y agoYou don't re-encode your disk from ASCII to EBCDIC when duplicating it? Have I been doing it wrong all of these years?
- soneil 6y agocasting my harddrive to lowercase does sound like kind of experiment that'd only cross your mind after 6 months of lockdown.
- saalweachter 6y agoI would start on media files, ideally formats that have a little bit of forgiveness where they'll try to render or play arbitrary sequences of bytes rather than just failing to parse them.
- tempodox 6y agoIt's actually “convert and copy” but the command name `cc` was already occupied by “C compiler”, so they just incremented each letter to `dd`. `dd` can convert-and-copy any device, not just disks.
- tempodox 6y agoAnd if you thought my parent comment was a bad joke, maybe read the man page: https://www.systutorials.com/docs/linux/man/1-dd/ https://www.systutorials.com/docs/linux/man/1-dd/
- hyperman1 6y agoAs it's inconceivable to conflict both Ritchie and the jargon file when talking about UNIX history, I stand corrected. However, I do remember seeing 'cc was already taken, hence dd' in some old linux documentation.
- JdeBP 6y agoAs can be seen at https://unix.stackexchange.com/q/6804/5132 https://unix.stackexchange.com/q/6804/5132 , this wrong answer is still more popular than the right one that is supported by Dennis Ritchie. A salutary lesson in believing things to be true because they seem humorous or are popular.
- classified 6y agoForgive GP for not knowing which Bible to read and at whose altar to prostrate themselves. Like every religion Unix has its goyim and infidels that need to be flogged and flagellated so they can achieve proper enlightenment.
- drfuchs 6y agoNope. As per Dennis Ritchie's 2004 comment in https://groups.google.com/g/alt.folklore.computers/c/HAWoZ8g-xYk https://groups.google.com/g/alt.folklore.computers/c/HAWoZ8g... , the "dd" command's name is a joke about the DD ("Data Definition") card in IBM's horrid Job Control Language (JCL). You'd need a DD card for each and every file that your program was going to access, and the name had to be specified ahead of time. A typical example, from https://programmerspub.com/learn/mainframe/jcl/the-dd-statement https://programmerspub.com/learn/mainframe/jcl/the-dd-statem... : //OUTPUT DD DSN=PROGPUB.FLATFILE.OUTPUT,DISP=(NEW,CATLG,DELETE), // RECFM=FB,LRECL=80,SPACE=(800,(2,5))