One day, Laurie S. from the business side came over to ask me for some help with her system: "I think I've filled up my disk, but how can I find out?" "Well, the 'df' command will show you that info." "But," she replied, "won't that just show me the files in your home directory?" "My home directory??? Why would it do that?" "Well, my initials are LS and that shows my files, and DF are your initials, so that should show your files."
I was super impressed.
Contrast this with the verbosity of more "modern" command languages like Powershell: while those may be a bit easier to understand the very first time, every time thereafter it feels like you're talking in a language where every word is a minimum of 10 letters and two syllables long. The mental overhead is far higher.
I've always remembered "bss" as the "bull-shit segment" --- because it initially doesn't have any useful content.
In general though I think the terseness of the standard Unix commands is a problem, particularly for less often used commands. Even after many years of using them I still get "du" and "df" confused, for example.
If I was designing them from scratch, I'd maybe call them something like "size" and "space" respectively.
"Red touches yellow, you're an okay fellow. Red touches black, you're a dead jack"
It's a good thing there aren't any coral snakes around where I live.
All of the really frequent commands, I can remember (cp, mv, cat, tar, head, tail, ls, mkdir, rm, grep, sed, and a handful of common programs like package managers and git) and everything else I can never remember and have to look up. I personally don’t like the unix command names, most don’t make much sense to me personally. Sure, I like that they’re short, but I can never remember them unless I use them a lot.
Personally, I prefer 'ls' for scripts too. I would never use "rd" for a variable name, but since I speak Unix, the more concise 'ls' seems better. To my colleagues without a Unix background, Get-ChildItem, probably is a better choice.
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.)
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: "..."
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.
I guess this happens less often otherwse there would be many more of this kind of joke.
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.
$ tldr dd
Convert and copy a file.
- Make a bootable usb drive from an isohybrid file (such like archlinux-xxx
dd if=file.iso of=/dev/usb_drive
dd if=/dev/source_drive of=/dev/dest_drive bs=4m conv=noerror
dd if=/dev/urandom of=random_file bs=100 count=1
dd if=/dev/zero of=file_1GB bs=1024 count=1000000
Wouldn’t it have been cool if nroff was “nuroff” so that run was spelled backwards, and “new” was represented phonetically?
The word is concatenate.
dd isn't on there, but it's good: it stands for 'copy and convert'. As you can imagine 'cc' was taken.
'less' is a joke, people who remember 'more' might find it funny, but few people remember 'more' so younger folks just think it's a nonsense name.
Catenate is a valid word, and synonymous with concatenate. Plus, "cat" makes a better 3 letter unix program name than "con", right?
Googling the difference (hint: none) I found this lovely ditty:
I never concatenate strings;
I just catenate those little things.
Of syllables few,
I'm a man through and through.
Shorter words? My heart joyfully sings!
cat - catenate and print
Carrying on the trend, there's also 'most'. https://en.wikipedia.org/wiki/Most_(Unix)
Concatenate is the more popular form over catenate, though it's interesting to see that it only started to leap ahead in the 60s and 70s:
bison from yacc (yet another compiler compiler)
pine (pine is not elm) from elm (did that one stand for anything)
* getty; agetty ("alternative"); mingetty ("minimal"); mgetty (I always think "modem" myself); uugetty ("UUCP"); fgetty ("fast"); and ngetty (probably "Nikola")
* ex; vi; stevie; elvis; calvin; elwin; javi; lemmy; pvic; trived; vigor; vile; vip; virus; winvi; xvi; vim, view, evim, exim, eview, rvim, rview, gvim, gex, gview, rgvim, rgview, vimdiff, and gvimdiff (VIM); nvi; and nvim (NeoVIM)
* pax, a peace treaty in the tar versus cpio argument
Edit: also some say rng which is a ring without an identity (without an i). I think there are others similar to this.
EMACS may stand for "Editing MACroS," but some friends of mine suggested some more creative definitions.
Here they are. Anyone have any additions?
Eight Megabytes And Constantly Swapping
Even a Master of Arts Comes Simpler
Probably was more applicable in the old days (as one call tell from the "megabytes" in the parent comment) than nowadays :)
And while it might technically be faster for the process, as is the case with e.g. STW GCs on large processes it 1. feels horrible and 2. as an editor is interactive it stops the user in their tracks and slows them down to hell
Wikipedia has (https://en.wikipedia.org/wiki/Network_Information_Service) the same story I remember, though doesn't give a source for it:
> Because British Telecom PLC owned the name "Yellow Pages" as a registered trademark in the United Kingdom for its paper-based, commercial telephone directory, Sun changed the name of its system to NIS, though all the commands and functions still start with "yp".
The pages aren't yellow, though.
"Système D" implies making use of what's available, it is hacking (the good kind). systemd is the opposite, it is nothing like a quick and dirty solution to a problem but a major architecture change that intends to replace these hacks with something cleaner.
If the french expression really was the origin of the "systemd" name, it has to be in a twisted kind of way, or some kind of private joke. It would be like calling an electric car "octane" or something like that.
sounds about right.
It was originally meant for any files that didn't fit into any of the predefined categories like `bin`, `lib`, and `dev`, hence the name "etc".
Moving stuff to /usr/bin made sense after systems got too big for a single volume and you've got this directory on a nice, new spacious multi-megabyte disk (oooh!) In those ancient days of Unix the sysop acting as the "bin" user owned /bin and the files inside it and could overwrite them from tapes or compilation.
(root would own the files in the sbin)
So /usr/bin technically started out as his or her home directory when logging in as that account... at least back then.
/usr/sbin only came about after /home became the colloquial location for home directories, such that you had parallel constructions for /bin and /sbin under /usr, and later, /usr/local just as you did at the root.
That sounds wrong. /usr/bin existed at least as early as V6, but the 'bin' user's home directory was /bin.
If say, "rm" was just "r" and "find" was just "f"... well those keys are right next to each other on a QWERTY keyboard after all. Oops.
There's an older unix calculator called dc, for desk calculator; dc uses reverse-Polish, so it's a pain to use if you didn't grow up using those weird old HP calculators (or writing Forth). My understanding is that bc began as a shell script which would translate infix expressions into RPN and pass them to dc.
These days, if i want to do sums, i fire up a Python interpreter, or just plug them into a Google search box or Firefox address bar. But back in the day, i would use bc.
I do that Google thing myself nowadays too :) They can even give answers to factorial(n) and the like. Found that recently. Wouldn't be surprised if a lot more too.
If Perl programs (executables, whatever you call them) are called "modules", why is the main place people download them from called CPAN?
It's completely illogical.
C = Comprehensive (It's not, it definitely does not contain all possible modules)
P = Perl (This is only one that makes sense)
A = Archive (If the things people create are called modules - .pm files, really - what makes this an archive? A collection of things? That's a weak leg to stand on. Yes, distributions formalizes this, but modules seems to be the common nomenclature.
N = Network (How is this a network? I think Wall - or later, Hietaniemi - just wanted people to think it was big and important in the early days)
This is all absurd and slightly sarcastic, but I finally got to write it down somewhere :)
• https://www.cpan.org/authors/id/H/HF/HFB/grok-cpan-1.01.pdf (page 3)
• https://ctan.org/ctan/?lang=en or http://dante.ctan.org/what_is_ctan.html
As I said before, take this with a dose of sarcasm :)
The archive is the collection of archive files which contains a combination of software libraries, documentation, programs, tests, and metadata. It also includes manifests, checksums and other data useful for the CPAN program.
The network is a collection of 250+ mirrors of the archives.
On a more serious note, while I was not aware of how extensively mirrored CPAN is, there is something to be said for it being the canonical source.
CPAN covers nearly all Perl libraries, and also covers nearly all categories of modules, as they are organized into a hierarchy based on topic, and the modules' naming naturally falls into a hierarchy as well. It's easy to find a module even without a search engine, and thus easy to find out whether you need to make one or whether one already exists. The result is a comprehensive archive of libraries.
Perl modules can be written to function as programs, a technique known as modulinos, but it is not a common approach.
> You might say that Perl grew out of the Cold War. I’ve often told the story about how Perl was invented at a secret lab that was working on a secret NSA project, so I won’t repeat that here, since it’s no secret. Some of you have heard the part about my looking for a good name for Perl, and scanning through /usr/dict/words for every three- and four-letter word with positive connotations. Though offhand, I can’t explain how I missed seeing Ruby. So anyway, I ended up with “Pearl” instead.
A Wired piece gives a deeper look.
> “Perl” is usually glossed as “Practical Extraction and Report Language,” and occasionally as “Pathetically Eclectic Rubbish Lister.” Both are retronyms. Originally, Larry wanted to name his new language Pearl, a word with positive connotations. Larry considers himself as much a linguist as a hacker. He’s also a fan of Tolkien’s Lord of the Rings. There are doorways into Tolkien’s imagination built right into the core of Perl. Each section of the source code begins with a quote from the Rings trilogy – say, “A fair jaw-cracker dwarf language must be.” If you understand the epigram, you comprehend what that section is designed to do. Larry wanted to give Perl a name that suggested that it was worth treasuring.
> Furthermore, Larry is a devout Christian – he’s the son of a fundamentalist Mennonite preacher from a long line of preachers. In the 13th book of Matthew, Jesus tells the parable of a merchant “seeking goodly pearls, who, when he had found one pearl of great price, went and sold all that he had, and bought it” – “it” being the Kingdom of Heaven. But there was already another programming language called Pearl. So Larry – whose personal motto, which has become the mantra of the Perl community, is “There’s more than one way to do it” – christened his new creation Perl.
"Historically, program output was printed on paper rather than on screens. So the print part is due to the output technology of the time that the command was developed."
That's ...an interesting definition of Perl. Last I heard it was the "gaffer tape of the internet" or some such. I put off learning Perl for so long that I don't need to anymore. I wonder how often it's used nowadays.