UN*X

There are SO many awesome UNIX commands. Some are incredibly useful, some take years to master (yes, just one command – awk anyone?), and some are just silly.

OS X, the system that I use, has its roots in 1969, with the advent of the first UNIX system. A historical diagram can be found here, with some of the derivatives since then. OS X was created in 1999, when Apple bought the rights to the BSD version of Unix, which had been developed over time by the University of California at Berkeley.

The cool thing is that OS X retains so much of the exact same commands, manuals, and functionality of many of the Unix versions of yore. Every so often I find something that is a remnant of these “ancient” systems, and it’s just amazing to me that the same commands can be used today, with few changes! Many commands, on the manual pages at the bottom, say:


HISTORY
A [name of command] command appeared in Version 1 AT&T UNIX.

That’s 1971! That’s not old old, like not ancient fossil old – but in computer land, it’s pretty old. Anyway, what sparked all this was stumbling upon the “yes” command, which is totally unnecessary to the system. All it does is repeat infinitely what comes after the “yes”. It was bundled with BSD Unix in 1980, the year I was born. So, if you ever find yourself at an OS X terminal, just type yes "LIVER AND ONIONS" and press control-c when you get tired of that.

  1. Ben

    “yes” outputs the answer indefinitely! A better utility for question answering in a program is probably “jot” which has a ton more options. Correct me if I’m wrong though 🙂 There was another one too, which is specifically designed to do just that, and has a huge man page, but I forgot what it was called.

  2. Actually, ‘yes’ is quite useful. If you’re compiling a program or running some other program where it is asking a bunch of questions, and you know you’re going to answer the same to all of them, you simply execute the ‘yes’ command with the desired answer, and pipe the output of that into the other program. It will do the work of answering “yes” for you!

Leave a Reply

Your email address will not be published. Required fields are marked *