Sixty years of wrong DD syntax (humor)
Posted: 30 Mar 2025, 21:13
Humor, but instructive about DD's history. You know we've been doing it wrong for sixty years right?
That is, the IF= and OF= pair is an ancient remnant from the 1960's IBM/360 mainframe JCL job control language, where when tasked with installing unix(tm), couldn't immediately grok redirection. So the IF and OF syntax remains in DD. Doug McIlroy pointed this out decades later how we can't get over it. So I searched, and saw in either the ATT Unix(tm) V6 or V7 manual (maybe it was V5, I forget) how to DD the system using redirection and my mind was blown. All these years!
Part of the problem is that books (and forums) munge whitespace making it look weird, and it wasn't until I saw the whitespace in the V7 manual, that it became clear. Because it always looked strange before, so I was afraid to doing it the "unix way". Maybe it was an early BSD install doc, I forget now...
I'll "mansplain" it by breaking it up. Let's say you want to DD burn your Porteus iso into the typical read-only format on a stick. I'll leave out option like bs=4M etc etc for clarity.
Part one:
Part two:
Put them together, but notice how it looks weird when simply adding a little whitespace between input and output, but due to munging in books and forums makes it look weird. It looks more like an option - I'm not going to try it, you try it!
Check this out: This is what I saw in the V7 manual (somewhere) with whitespace!
BUT, when I researched how far back this goes when McIlroy first mentioned using the "unix way" of doing it, rather than the IBM/360 mainframe syntax, it was the few spaces of additonal whitespace between "iso" and the ">" redirect in that V7 manual that made the light shine!
So next time you DD, try doing it the RIGHT way! I'll bet your fingers tremble. I know mine did.
That is, the IF= and OF= pair is an ancient remnant from the 1960's IBM/360 mainframe JCL job control language, where when tasked with installing unix(tm), couldn't immediately grok redirection. So the IF and OF syntax remains in DD. Doug McIlroy pointed this out decades later how we can't get over it. So I searched, and saw in either the ATT Unix(tm) V6 or V7 manual (maybe it was V5, I forget) how to DD the system using redirection and my mind was blown. All these years!
Part of the problem is that books (and forums) munge whitespace making it look weird, and it wasn't until I saw the whitespace in the V7 manual, that it became clear. Because it always looked strange before, so I was afraid to doing it the "unix way". Maybe it was an early BSD install doc, I forget now...

I'll "mansplain" it by breaking it up. Let's say you want to DD burn your Porteus iso into the typical read-only format on a stick. I'll leave out option like bs=4M etc etc for clarity.
Part one:
Code: Select all
dd < myporteus.iso
Code: Select all
> /dev/sdX
Code: Select all
dd <myporteus.iso> /dev/sdX
Code: Select all
dd < myporteus.iso > /dev/sdX
So next time you DD, try doing it the RIGHT way! I'll bet your fingers tremble. I know mine did.
