4 ms·
I didn't know grep! I've seen grep used as a verb enough times that the word "grep" just intuitively seems to describe what it does: grep things. I was hoping
by EarthIsHome 6y ago
I didn't know grep! I've seen grep used as a verb enough times that the word "grep" just intuitively seems to describe what it does: grep things.
I was hoping dd would be listed.[0]
Edit: digging a little deeper into [0], there's a Unix Acronym List linked [1]. There seems to be various definitions for dd. One definition says that dd stands for copy and convert, but since cc was already taken for the C compiler, dd was used.
[0]: https://unix.stackexchange.com/questions/6804/what-does-dd-stand-for https://unix.stackexchange.com/questions/6804/what-does-dd-s...
[1]: https://groups.google.com/forum/#!topic/comp.unix.misc/LbLTa00Jnvg https://groups.google.com/forum/#!topic/comp.unix.misc/LbLTa...
- dghughes 6y agoIsn'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))
- acheron 6y agoI always liked that dd story but it's probably not true -- it's based on the DD command in IBM JCL, which stood for "data definition".
- deleted 6y ago[deleted]
- Sebb767 6y agoI've also heard disk dump, but this might be a backronym.
- p_l 6y agoNothing says it can't be both "incremented cc" and "DD from JCL" - especially when you consider the way the options are given, which I've heard from some Bell Labs sources long ago originated as joke on JCL
- evanb 6y agoComputerphile did a great video with Brian Kernighan on "Where GREP Came From" https://www.youtube.com/watch?v=NTfOnGZUZDk https://www.youtube.com/watch?v=NTfOnGZUZDk
- chills 6y agog/re/p lives on as :g in vim, it's kind of fun to remember its heritage to ed. There is also :v which is analogous to grep -v.
- saalweachter 6y agoDid anyone else think it was GNU-rep, presumably a reference to an older UNIX command?
- kstrauser 6y agoYep. When I was a little sysadminlet, I asked my mentor that exact question. He had a good laugh out of it.
- xxr 6y agoSame--up until now I "knew" that grep stood for "GNU regular expression parser." Always good to have a reminder to question all the other things we "know."
- cat199 6y ago> Always good to have a reminder to question all the other things we "know." See also the 'HISTORY' section in BSD manual pages, then check their GNU clones.