3 ms·
dd is a mainframe command, and its syntax follows the JCL conventions used there. https://www.ibm.com/docs/en/zos-basic-skills?topic=concepts-jcl-statements-wh
by dredmorbius 5y ago
dd is a mainframe command, and its syntax follows the JCL conventions used there.
https://www.ibm.com/docs/en/zos-basic-skills?topic=concepts-jcl-statements-what-does-dd-statement-do https://www.ibm.com/docs/en/zos-basic-skills?topic=concepts-...
- smcameron 5y agoHuh. I'd always kind of guessed that dd used if=input-file of=output-file as a way to sort of prevent the use of shell globbing and to not rely on the order of arguments (as cp does) since dd as it is often used can be a bit dangerous (I often found myself using it with disk device files) and you want to be extra careful in specifying the input and especially the output files. Edit: wikipedia agrees with your IBM origin story https://en.wikipedia.org/wiki/Dd_(Unix)#History https://en.wikipedia.org/wiki/Dd_(Unix)#History
- dredmorbius 5y agoThe syntax is common to most JCL ("job control language") commands. I'd say "all", though there are probably exceptions. For some reason, this seems to be vanishingly scarce knowledge in Linux / Unix circles. There was a time in my life I knew how to spell JCL....
- reaperducer 5y agoFor some reason, this seems to be vanishingly scarce knowledge in Linux / Unix circles. There was someone on HN a couple of weeks ago who was astounded to learn that "modem" means "modulator-demodulator." Like it was some kind of forbidden magic. Things that you an I consider entry-level knowledge are like scrolls and rune stones to tech people these days.
- dharmab 5y agoI'm old enough to have used modems and never heard the long name before.
- imwillofficial 5y agoI remember when the internet used to scream at me. I remember the proper name of a modem from my ancient CompTIA A+ classes I took as a teenager.
- Stratoscope 5y agoYou don't have to be a certain age to have used modems. You used one today to send that comment! Likely more than one. Radio, cable, and fiber don't carry bits. They carry waves - analog signals - just like an old fashioned copper phone line. They all need a modulator-demodulator to convert between bits and waves.
- onetom 5y agoI had a similar experience, when ppl didn't know that codec comes from coder-decoder... It happened, when I called a Clojure namespace x.y.codec, with encode and decode functions in them. I've also noticed how some of my colleagues hasn't realized, that the Rust serde library is short for serialize-deserialize.
- mixmastamyk 5y agoMore in this area: http://www.catb.org/esr/faqs/things-every-hacker-once-knew/ http://www.catb.org/esr/faqs/things-every-hacker-once-knew/
- My70thaccount 5y ago[flagged]
- leokennis 5y agoI started my IT career by accident on a mainframe system: JCL, COBOL, CICS, DB2. When I made the switch to working on a JAVA application running on Linux I had a hard time accepting how easy a lot of stuff was.
- thfuran 5y agoFor safety, selecting arguments distinguished only by choice of two letters adjacent on the most common keyboard layout seems unwise.
- elvis70 5y agoThe parameter names don't seem to match those of dd. If you type man dd, the function of the tool will be described as "copy and convert". I can't find the video but there is an interview in which Kernighan, I think, explains that the tool should have been named cc but it was not possible because it was already taken by the c compiler.
- dredmorbius 5y agoThe IBM webpage only covers a few of the JCL DD parameters. There are more at pp. 486ff in Doug Lowe, MVS JCL (1994) here: http://library.lol/main/6784CBC9EE9BBA5AD26993F497514661 http://library.lol/main/6784CBC9EE9BBA5AD26993F497514661 It's still a rather rough fit, though I'm still pretty sure the connection exists. Keep in mind that Unix dd dates to the early 1970s, and JCL itself may have evolved.
- butlerm 5y agoThe name of dd(1) may have some tenuous connection to the JCL DD statement, but otherwise any similarity seems virtually non-existent. They don't even remotely do the same thing, none of the options or parameters are the same or have similar meanings, or anything like that. https://man7.org/linux/man-pages/man1/dd.1.html https://man7.org/linux/man-pages/man1/dd.1.html
- vincent-manis 5y agoMy understanding is that the name dd was essentially a joke. A DD statement in JCL defined a logical name (seen by the program) to refer to a file (`dataset'). It had many strange operands, and often its behavior was completely unintuitive. For example, here is a job that deletes the file MYFILE. //MYJOB JOB //FOOBAR DD DSNAME=MYFILE,DISP=(,DELETE) //STEP1 EXEC PGM=IEFBR14 IEFBR14 is a program that does nothing at all! Although the Unix dd command wasn't patterned on the JCL command, I suspect that the multiplicity of possible options led its designers to choose the key=value option syntax that looked vaguely OS/360ish. By the way, the - flag for options first appeared in MIT's CTSS, which was the direct ancestor (at least at the user level) of Multics.
- dredmorbius 5y agoI'd ... thought that more of the Unix arguments (block, unblock, conv, etc.) were supported on JCL, though my IBM link doesn't support that. I'll see if I can find a more canonical / complete reference.