WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: First DD command found!  (Read 2590 times)

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
First DD command found!
« on: July 27, 2020, 10:39:40 PM »
For the longest time during my hobbiest use of *nix, I've always wondered why the DD command does not follow the normal unix convention of redirection.

That is, we see this common example today:

Code: [Select]
dd if=[infile] of=[outfile]
But why not this which is more like how *nix is supposed to be:

Code: [Select]
dd < infile > outfile
I think at first look, it is to help make sure you absolutely don't make a mistake!  Strangely enough, this makes more sense to me than using syntax from 1964 IBM JCL language.

Even Doug McIlroy makes note of it.

But then I got my answer trying to search for the first evidence of using dd in *nix, and if it ever used the <> syntax, which works btw.

Then I got my answer:
One day before the first episode of Saturday Night Live aired on television, Ken and Dennis released the V6 installation manual:

https://gunkies.org/wiki/Setting_up_UNIX_-_Sixth_Edition

Look on page 8!  GAK!  There it is - using IF= and OF= pairs!

Ken and Dennis are no dummies and are obviously aware of how backward-thinking this is.  So why did they use this syntax?  I can only offer conjucture:

1) Maybe they were used to this syntax from using dd on other systems well before Unix, like a decade or more and just were comfortable doing it this way.

2) OR, the people likely to install Unix may not have their wizard-hats on, and also have been working on systems for a decade prior, and IF / OF was the safer bet.

3) Or simply that even though the <> redirection is the *cool* way to do it, maybe IF and OF are just simply attempts to help you get it right - wizard hat or not.

I dunno' - it made me laugh at myself when I saw that in the 1975 install manual.

That's a UNIX book! - cool  -- Garth