News for hackers. Stuff that matters.
Re:What do Unix command names stand for? by excitom on Friday June 15, 2018 @06:11PM (#17324062)
My favorite: "dd" the "copy and convert" command, but "cc" was already taken by the C compiler.
Re:What do Unix command names stand for? by VSpike on Friday June 15, 2018 @06:39PM (#17324281)
Ever since somebody told me the joke, I can't help thinking of it as "disk destroyer". It's a much more appropriate name.
Re:What do Unix command names stand for? by planteen on Friday June 15, 2018 @10:15PM (#17325411)
Yep learned my lesson once on a malformed dd command and never again have I made a mistake.
Re:What do Unix command names stand for? by cel1ne on Saturday June 16, 2018 @06:03AM (#17326800)
Reminds me of “rm -Rf” meaning “read mail really fast” ;)
Re:What do Unix command names stand for? by trampi on Saturday June 16, 2018 @09:03AM (#17327228)
Hah, a BOFH reference :-)
Re:What do Unix command names stand for? by cesarb on Friday June 15, 2018 @06:47PM (#17324356)
I thought it came from JCL's DD (Data Definition) statement. Even the parameter syntax is somewhat reminiscent of JCL's DD, while being completely alien to normal Unix commands.
Re:What do Unix command names stand for? by ori_b on Friday June 15, 2018 @07:46PM (#17324742)
It is. It was making fun of the IBM command.
Re:What do Unix command names stand for? by skissane on Saturday June 16, 2018 @12:43AM (#17325894)
The dd-style syntax isn't actually that bad. of=X if=Y is possibly easier to remember than -o X -i Y, while still being less typing that --output X --input Y.

JCL itself has a lot of warts, no denying that. But the basic idea behind the DD statement is interesting. In Unix, file descriptors are just numbers; whereas, in classic MVS, instead of numeric file descriptors the API uses 1-8 character names (DDNAMEs). While in principle a Unix program can inherit any number of file descriptors, in practice very few programs inherit any more than 0-2, because remembering numbers has poor usability. In classic MVS, it is not uncommon for a program to inherit more than 3 file descriptors, because they are assigned names not numbers. ("File descriptors" and "inherit" are not quite the right terms, but trying to use Unix-like language to make it comprehensible to people.)

(And I say classic MVS, because contemporary z/OS is actually a conforming Unix implementation so it supports numeric file descriptors in the Unix API, as well as alphanumeric DDNAMEs in the classic MVS API.)

Re:What do Unix command names stand for? by evacchi on Saturday June 16, 2018 @03:06AM (#17326310)
My favorite, related, piece of trivia about JCL is the IEFBR14 program: the no-op program that took a few attempts to get it right :-) [1]. Its entire purpose was motivated by JCL not having primary commands to do file management, which is only allowed as a "side effect" of executing a program

[1] https://en.wikipedia.org/wiki/IEFBR14#Implementation

Re:What do Unix command names stand for? by YeGoblynQueenne on Saturday June 16, 2018 @05:18AM (#17326700)
>> JCL itself has a lot of warts, no denying that.

Unix Programmer: "Huh? Why did you comment out the entire program, except for that one function?"

Mainframe Programmer: What? No, those are JCL statement lines."

Unix Programmer: "..."

Re:What do Unix command names stand for? by skissane on Sunday June 17, 2018 @12:18AM (#17330856)
I'm not sure it is fair to call that a wart. Back when JCL was designed, C/C++ didn't exist yet, and nobody used "//" as a comment syntax. (C's predecessor BCPL introduced // comments, but it was designed in 1967, and OS/360 was already shipping to customers in 1966; C itself was designed in 1972, and initially it didn't have // comments; C++ borrowed them from BCPL in the 1980s, and then C borrowed them back from C++ after that.)

A more obvious example of a wart would be how it exposes low-level details of disk layout (e.g. space allocation in cylinders and tracks), which improved performance and simplified implementation back in the 1960s, but which nowadays is just useless complexity–modern disks have completely different physical layout, and you have to buy expensive mainframe-specific SAN controllers which know how to simulate the ECKD physical layout of legacy mainframe disks on top of modern industry standard disks/SSDs.

Re:What do Unix command names stand for? by YeGoblynQueenne on Sunday June 17, 2018 @07:04AM (#17331848)
I agree that this is just a "wart" from the perspective of a modern programmer, faced for the first time with JCL (and mainframes in general).

I guess this happens less often otherwse there would be many more of this kind of joke.

Re:What do Unix command names stand for? by marcosdumay on Saturday June 16, 2018 @11:35AM (#17327792)
I still think that unless you are very proficient on it, having to look at the manual every time you use dd is a good thing.
Re:What do Unix command names stand for? by paulie_a on Friday June 15, 2018 @10:34PM (#17325484)
Which is funny on a different note because ibm had the deskstar hard drives better known as the deathstar drive
Re:What do Unix command names stand for? by 0xcde4c3db on Saturday June 16, 2018 @11:58AM (#17327898)
I'm pretty sure that was coined specifically in reference to the Deskstar 75GXP series, not Deskstar drives in general. The Deskstar brand name is actually still used by HGST for its NAS drives, which seem to be reasonably well-regarded for their intended applications.
Re:What do Unix command names stand for? by sverige on Friday June 15, 2018 @08:40PM (#17324998)
I still pause to remember that I have to type 'if=' and 'of=' and 'bs=' instead of just remembering the order of arguments.
Re:What do Unix command names stand for? by code_duck on Saturday June 16, 2018 @05:20AM (#17326704)
What always gets me is ssh, scp and sftp... having to specify oPort= for sftp compared to -p for ssh.
Re:What do Unix command names stand for? by trinitry3 on Saturday June 16, 2018 @05:29AM (#17326726)
You can use -P.
Re:What do Unix command names stand for? by kasey_junk on Saturday June 16, 2018 @08:59AM (#17327219)
Whoever made it -p in ssh & -P in scp can fuck right off.
Re:What do Unix command names stand for? by cesarb on Saturday June 16, 2018 @11:26AM (#17327748)
The reason is that scp was designed as a secure replacement for rcp, which was designed as a remote version of cp. The flags -p and -r were inherited from cp by rcp (see https://linux.die.net/man/1/rcp), so for compatibility scp had to use the same flags.

As for ssh, I haven't looked at its history, but I suspect it's older than scp; the intuitive flag for "port" is -p, so that's what ssh used.

Re:What do Unix command names stand for? by code_duck on Sunday June 17, 2018 @12:30AM (#17330880)
Good to know. I wonder if that's a recent improvement? Last time I was doing lots of sysadmin work was 2011.
Re:What do Unix command names stand for? by pronoiac on Saturday June 16, 2018 @01:56PM (#17328507)
I'd prefer ddrescue or just pv, just for the progress meter, and saner arguments.
Re:What do Unix command names stand for? by dmartinez on Saturday June 16, 2018 @09:35AM (#17327325)
`tldr`[0] can be helpful for quick references like this. I never worry about commands like `ssh` anymore because of this. This is the output for `dd`:

$ tldr dd

dd

Convert and copy a file.

- Make a bootable usb drive from an isohybrid file (such like archlinux-xxx .iso):

    dd if=file.iso of=/dev/usb_drive
- Clone a drive to another drive with 4MB block and ignore error:

    dd if=/dev/source_drive of=/dev/dest_drive bs=4m conv=noerror
- Generate a file of 100 random bytes by using kernel random driver:

    dd if=/dev/urandom of=random_file bs=100 count=1
- Benchmark the write performance of a disk:

    dd if=/dev/zero of=file_1GB bs=1024 count=1000000
[0]: https://github.com/tldr-pages/tldr
Re:What do Unix command names stand for? by I_complete_me on Sunday June 17, 2018 @10:18AM (#17332453)
I've been using a similar command called 'cheat' [pip install cheat] which does more or less the same thing. I wonder which of the two is more comprehensive. How would I check this efficiently?
Re:What do Unix command names stand for? by jedberg on Friday June 15, 2018 @07:17PM (#17324543)
I always thought it was "data dump".
Re:What do Unix command names stand for? by twic on Saturday June 16, 2018 @11:29AM (#17327763)
I thought it was "data director".
Re:What do Unix command names stand for? by Sir_Cmpwn on Friday June 15, 2018 @06:35PM (#17324250)
Later backronymed to "disk destroyer", of course.
Re:What do Unix command names stand for? by implements on Saturday June 16, 2018 @03:33AM (#17326407)
Ahh. I had it as "Device Direct (Copy)" for some reason.
Re:What do Unix command names stand for? by Coding_Cat on Saturday June 16, 2018 @09:06AM (#17327238)
I, for some reason, have it as 'disk duplicate' in my mind.
Re:What do Unix command names stand for? by digikata on Saturday June 16, 2018 @02:12PM (#17328583)
I've always thought of it as "data dump"