12
votes

This is the twin to this question.

Most obscure/upvoted answer will get the answer vote!

Most Unix and Unix-like systems have a "traditional history" that is passed down with each generation, so that newcomers can see and understand some of the more esoteric portions of the system. What long-time *nix admins out there contribute as to the "Legendry" of "UNIX", as far as esoteric knowledge that new admins should be exposed to?

12
  • 2
    Should wiki this, methinks
    – squillman
    Aug 13, 2009 at 20:37
  • I will, in good time. ;) Truth be told, I have done several pure-play wikis, and unless there is even a hint of votes to be gained, no-one will come. Seriously, it works this way every time, without fail. People will not put in entries for a wiki unless it's absurdly non-work-related (i.e. favorite sysadmin cartoon, etc.) Aug 13, 2009 at 20:39
  • 2
    I've noticed the "no one comments in wikis" thing. That's so bizarre. People play serverfault like it's a video game. Dumb. Aug 13, 2009 at 20:45
  • 1
    I've noticed it as well, but (IMHO) doesn't mean we should encourage the rep-whoring... Let me know when you take it over to meta, they come up with some pretty good flames over there (trust me, you'll get it) :)
    – squillman
    Aug 13, 2009 at 21:27
  • 1
    I hate to say it...but I think there should be some kind of compromise. My general observation has been that if you reach a certain "critical mass", you can shift into a wiki and the question will continue to gather answres. So, I am wondering, if you set the wiki flag, maybe it should wait to enough answers to kick-start the question, and maybe after a preset time - say 3 hours - it kicks automatically into wiki. This is a good compromise, a balance between rewarding the people who are willing to start the process and making it a community effort based on contribution. Ideas? Comments? Aug 14, 2009 at 16:24

11 Answers 11

20
votes

A personal favourite has always been "The Case of the 500-Mile Email"

http://www.ibiblio.org/harris/500milemail.html

Spoiler

$ units
2411 units, 71 prefixes, 33 nonlinear units

You have: 3 millilightseconds
You want: miles
    * 558.84719
    / 0.0017893979
5
  • 1
    Wow, I posted three answers but this one has got to be the winner!
    – HTTP500
    Aug 14, 2009 at 1:23
  • +1 Yeah, I love this one. Except you spelled favorite wrong (haha, jk)
    – squillman
    Aug 14, 2009 at 1:28
  • @squillman All that Tolkien growing up ;-) Aug 14, 2009 at 5:01
  • @squilman - no, he didn't. That's the correct English spelling.
    – Alnitak
    Aug 14, 2009 at 13:42
  • @squilman Depends if you're Canadian. (colour, favourite, cheque, etc.) ;-)
    – KPWINC
    Aug 14, 2009 at 17:35
11
votes

For me the most amazing thing about the UNIX tradition is that UNIX was basically written by one guy - Ken Thompson while at Bell Labs. There is a fascinating account of this that can be found here: http://www.bell-labs.com/history/unix/

Some of the quotes are just priceless:

"I allocated a week each to the operating system, the shell, the editor, and the assembler to reproduce itself...", Thompson explained.

Pipes:

Another innovation of UNIX was the development of pipes, which gave programmers the ability to string together a number of processes for a specific output.

It wasn't easy. "It's very easy to say 'cat into grep into...,' or 'who into cat into grep,'" McIlroy explained. "But there are all these side parameters that these commands have; they just don't have input and output arguments, but they have all these options."

Although stymied, McIlroy didn't drop the idea. "And over a period from 1970 to 1972, I'd from time to time say, 'How about making something like this?', and I'd put up another proposal, another proposal, another proposal. And one day I came up with a syntax for the shell that went along with the piping, and Ken said, 'I'm going to do it!'"

"He was tired of hearing this stuff," McIlroy explained. "He didn't do exactly what I had proposed for the pipe system call. He invented a slightly better one that finally got changed once more to what we have today. He did use my clumsy syntax."

"Thompson saw that file arguments weren't going to fit with this scheme of things and he went in and changed all those programs in the same night. I don't know how...and the next morning we had this orgy of one-liners."

"He put pipes into UNIX, he put this notation into shell, all in one night," McElroy said in wonder.

As technically neat as the accomplishment was, when Thompson created pipes, he also put something else into UNIX -- a philosophy.

As McIlroy described it, "the philosophy that everyone started to put forth was 'Write programs that do one thing and do it well. Write programs to work together. Write programs that handle text streams, because that is a universal interface.'"

1
  • 7
    Best. All-nighter. Ever. Aug 14, 2009 at 3:24
8
votes

tar never exits with an error. NEVER. Beware.

Source: The UNIX-HATERS Handbook, page 31 (http://simson.net/ref/ugh.pdf) Sorry, no HTML version.

This book happens to be chock-full of other legendry, and it's mostly still applicable. In my years of using Linux, I've run across many of these gotchas... just not any of the ones involving rm-ing my entire drive, thank goodness. It's stunning to me that so much of this book is still accurate, even though it was written over 15 years ago.

And now my own tar horror story, nearly an exact replica of the UNIX-HATERS one. Same bug, 14 years later!

I want my wireless working on my eeepc, for which I must download a driver, compile it, and install it. I download everything I need, and set off to the library to work. Halfway through, I realize that yes, I DO need the internet for something, so I go to install.

tar -cvf somewirelessdriver.tar ./importantcompilerfiles

Oh, crap. Did I just type -cvf instead of -xvf?

Yup.

Did tar just silently create a tar file of random garbage, overwriting my usable file?

Yup. Great. I guess I'll just do without internet access. Good thing it wasn't a multi-gigabyte file... Oh wait, that happened a week before.

Honestly, what the heck is up with cryptic command-line arguments and linux programs? Can't they just automatically do the basic operation when invoked on a file with the appropriate extension. Why in the blazes do I need to tell tar what to do with an ARCHIVE? Does it think that I might want to archive it AGAIN?

I think I finally understand what a 'tar pit' is, now. IT'S A PLACE THAT FILES GO TO DIE.

4
  • 1
    Wow. Just...wow. Any chance you can re-edit with a link on this? Aug 13, 2009 at 20:48
  • 4
    Come on, an error would mean that tar failed. You should just state the truth...tar never fails ;-) Aug 13, 2009 at 20:50
  • Link added, as well as more commentary. As a side note, I did in fact buy my MSI Wind, spending an additional 350$, simply so that I didn't have to use Linux if I didn't feel like it. This story is one of the MANY reasons why.
    – SilentW
    Aug 13, 2009 at 22:10
  • Is there anything you do nowadays to avoid these kind of tar errors? If so, do you have any answers for stackoverflow.com/questions/1122977/… Dec 6, 2009 at 3:21
6
votes

Logging in with all caps

http://utcc.utoronto.ca/~cks/space/blog/unix/UnixFossilizationExample

hrm. I fear I may have misunderstood the question :-)

But I'm leaving the link, because I find it interesting!

1
  • Actually, the answer is spot-on; the intent of the question was to gather esoterica (much like its sibling question) from various people's experiences. Aug 13, 2009 at 20:43
6
votes

The original pipe symbol was ^

The original delete key was #

The original "kill" key (erase everything on the line) was @

If you ever log onto an older system and can't seem to type a comment or an email address, stty becomes your friend.

This is an example 7th ed login session where the person making the log was gracious enough to run stty.. Also, as mentioned here it says "How to identify a traditional Bourne shell? 1 A simple check for an often undocumented but characteristic feature: You can use the circumflex ^ (caret) as replacement for | (pipe)."

1
  • 1
    Interesting. Any source for that, for further reading?
    – sleske
    Aug 13, 2009 at 23:48
5
votes

A famous Turing-award lecture of Ken Thompson:

http://www.ece.cmu.edu/~ganger/712.fall02/papers/p761-thompson.pdf [PDF]

When you put a backdoor for login in your C compiler, nasty things might happen...

3
votes

NetBSD can run on just about anything. There are 57 (57!) supported ports:

http://www.netbsd.org/ports/#in-tree-ports

Cheers

2
votes

One that probably a lot of newcomers to Linux don't know is that the creator of Linux (Linus Torvalds) borrowed heavily from the MINIX Operating System (an educational tool) created by Professor Andrew Tanenbaum: http://en.wikipedia.org/wiki/Andrew_S._Tanenbaum#MINIX .

Linus and Prof. Tanenbaum also debated at length the merits/pragmatism of a monolithic kernel (Linux) versus a microkernel (MINIX, Solaris). The debate was public and can be found here: http://oreilly.com/catalog/opensources/book/appa.html

Cheers

1
  • 1
    The Torvalds-Tanenbaum debate is a real classic :-).
    – sleske
    Aug 14, 2009 at 0:34
2
votes

The Art of Unix Programming is a good read for anyone interested in computing, not just those interested in Unix. Yes some of it is dated, but it is still an essential read.

2
votes

Everything is a file, or can be treated as such... except the darn user.

Bus error means you are trying to execute data, which was stored on the data side of the PDP/11's split data/program bus.

Unix is the only O/S that got calenders and clocks right from the beginning, only because an astronomer was one of the creators. (Extra comment-credit: name that writer. Extra-extra credit: name the Olympic medal winner on the UNIX team.)

The GCOS field in /etc/passwd was named after the GECOS operating system, and placed there only because they were using a GECOS mainframe as a print server to the original Unix mini, and it needed the data to accept a print job.

2
  • 1
    and networking. Who knows what they were smoking when making the BSD model of networking in unix, but it sure ain't unixy.
    – chris
    Aug 13, 2009 at 21:22
  • AT&T implemented Streams to be a more UNIXy network API, and put a Socket API layer over it for compatibility. Then BSD (4.4 I think) added Streams as a compatibility layer API that called Sockets.
    – kmarsh
    Aug 13, 2009 at 21:27
1
vote

A not so funny thing I did with tar once, and a tar that took a week to run:

  1. tar zcf foo.tar.gz ...
    • Some time during the next day or so, screen session was up on my screen: <UP>
    • A day or so later: <enter>
    • Tar finished , guess what to keys got held in the buffer, and entered into the shell the second after the tar finished ...

An upvote on their comment for the first person to explain what happened :-) The moral of the story, run stuff in the background of screen session.

That being said, I still love *NIX. I don't mind when things are messed up because it was my fault.

1
  • More a response to SilentW's answer than the question itself :-) Aug 18, 2009 at 21:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .