←back to thread

330 points todsacerdoti | 2 comments | | HN request time: 0.406s | source
Show context
plorkyeran ◴[] No.46237424[source]
> grep (global regular expression print), awk (Aho, Weinberger, Kernighan; the creators’ initials), sed (stream editor), cat (concatenate), diff (difference). Even when abbreviated, these names were either functional descriptions or systematic derivations.

If you asked someone unfamiliar with unix tools what they thought each of these commands did, diff is the only one which they would have even the slightest chance of guessing. It's ridiculous to complain about "libsodium" and then hold up "awk" as a good name.

replies(15): >>46237555 #>>46237769 #>>46238238 #>>46238337 #>>46238800 #>>46238821 #>>46238937 #>>46239204 #>>46239290 #>>46240333 #>>46240524 #>>46242479 #>>46243231 #>>46243495 #>>46244061 #
mojuba ◴[] No.46237555[source]
However once you learn that sed means stream editor, you won't ever forget it. libsodium is forgettable.
replies(7): >>46237653 #>>46237672 #>>46238241 #>>46238519 #>>46239194 #>>46239860 #>>46242688 #
forrestthewoods ◴[] No.46238519[source]
lol no. There are literally a hundred plus Unix tools and commands. I couldn’t tell you what 90% of them mean. I sure as hell couldn’t have told you what sed stood for. And if you asked me tomorrow I also wouldn’t be able to tell you.

C programmers are great. I love C. I wish everything had a beautiful pure C API. But C programmers are strictly banned from naming things. Their naming privileges have been revoked, permanently.

replies(3): >>46238756 #>>46239455 #>>46240412 #
wombatpm ◴[] No.46238756[source]
Relevant XKCD

Https://xkcd.com/1168/

replies(1): >>46239193 #
WJW ◴[] No.46239193[source]
Someone once tried this on me during Friday drinks and I successfully conquered the challenge with "tar --help". The challenger tried in vain to claim that this was not valid, but everyone present agreed that an exit code of zero meant that it was a valid solution.
replies(3): >>46239395 #>>46240202 #>>46241039 #
chihuahua ◴[] No.46239395[source]
I seem to remember "tar xvf filename.tar" from the 1990s, I'll try that out. If I'm wrong, I'll be dead before I even notice anything. That's better than dying of cancer or Alzheimer's.
replies(2): >>46239536 #>>46240068 #
tharkun__ ◴[] No.46239536[source]

    tar zxvf
Is burnt into my brain. One of my earliest Linux command line experience required untaring zipped tars.

So yeah that xkcd is "not funny" to me in that sense. Of course I couldn't tell you pretty much any other use without a man page.

replies(1): >>46240224 #
1. necovek ◴[] No.46240224[source]
z requires it's compressed with gzip and is likely a GNU extension too (it was j for bzip2 iirc). It's also important to keep f the last because it is parametrized and a filename should follow.

So I'd always go with c (create) instead of x (extract), as the latter assumes an existing tar file (zx or xz even a gzipped tar file too; not sure if it's smart enough to autodetect compress-ed .Z files vs .gz either): with create, higher chances of survival in that xkcd.

replies(1): >>46244029 #
2. thaumasiotes ◴[] No.46244029[source]

    tar xvzf file.name
is always a valid command, whether file.name exists or not. When the file doesn't exist, tar will exit with status '2', apparently, but that has no bearing on the validity of the command.

Compare these two logs:

    $ tar xvzf read.me
    tar (child): read.me: Cannot open: No such file or directory
    tar (child): Error is not recoverable: exiting now
    tar: Child returned status 2
    tar: Error is not recoverable: exiting now

    $ tar extract read.me
    tar: invalid option -- 'e'
    Try 'tar --help' or 'tar --usage' for more information.
Do you really not understand the difference between "you told me to do something, but I can't" and "you just spouted some meaningless gibberish"?