views:

1015

answers:

19

Just for fun ... I tend to keep myself alert by looking for serendipitous puzzles throughout the day. One of the things I love about linux is the never-ending amount of cleverness it embodies, from its elegant simplicity all the way to the comments in its manual pages.

Can you articulate the unwritten rules that dictate how new commands are named, or provide some history behind common commands? What essential command is missing from stock linux distros--what would it do, and what would you name it?

Examples:

  • cat is used to catenate files. It has been superseded by dog in some distros.
  • ssh provides a secure shell, but it can't be a coincidence that it just begs to be pronounced "ssssshhhhh!"

Bonus Puzzle: One of our long-time customers was MCI, and their shipping address was 1101 Summit Ave. Now, MCI was a large company and probably could have chosen any address ... so why 1101? Amazingly, I've never come across an MCI employee who knew this answer ... but they didn't have SO back then!

EDIT: Before this gets out of hand: please do not simply list commands! I'm looking for answers to the questions in italics above. Thanks!

+17  A: 

MCI = 1101 in Romans Numerals... I never clicked that until just now :)

Phill Sacre
The obvious is often overlooked. +500 Geekpoints!
Gamecat
+1 for being awake before I've had my coffee! Take a look at the 800 number on cans of Coke products. :-)
Adam Liss
+1  A: 

I know of the tools more and less which are obviously related. They show the contents of a file in small chunks so they can be shown on a screen. And in this case less is more than more.

Gamecat
Well less IS more after all.
Jason Baker
And then there's most... :-)
agnul
+3  A: 

Many UNIX commands historically had short names so that less had to be typed into the terminal back in the days when slow teletypes were used, to some degree the tradition has stuck even today.

As for the MCI thing, they had several addresses beginning with 1101, MCI is 1101 in Roman Numerals.

Robert Gamble
+1 for the history lesson--which is what I'm hoping to find in these answers!
Adam Liss
A: 

sed = stream editor ... but I can't help thinking, That's not what I sed! Coincidence?

Adam Liss
+3  A: 

zsh was the login of its author Zhong Shao

Jason Baker
+4  A: 

GNU's replacement of the yacc parser generator is named bison.

On a related note, we recently made a small change to the tee command to insert time stamps into its output for debugging a nasty problem. What we called the new command? teetime, of course :-)

Filip Korling
In the moreutils package, there's also a "pee" command: "tee standard input to pipes"
oliver
I have a minor variant on 'byacc' - the Berkeley YACC - that I call 'kayak'.
Jonathan Leffler
+13  A: 

Kind of a joke answer, but citing from http://www.mindspring.com/~blackhart/requium.html:

I have only been able to come up with one algorithm for creating Unix command names: think of a good English word to describe what you want to do, then think of an obscure near- or partial-synonym, throw away all the vowels, arbitrarily shorten what's left, and then, finally, as a sop to the literate programmer, maybe reinsert one of the missing vowels.

CesarB
It's true.internet download => web get => wbgt => wgt => wget
Rich Bradshaw
+1 for posting the first algorithm.
Adam Liss
+5  A: 

grep was from the ed command, g/re/p or Globally search for Regular Expression and Print.

yacc, of course, was Yet Another Compiler Compiler.

perl was Practical Extraction and Report Language (see also the comments).

roff was a simple contraction of 'runoff' (a similar system that existed on other non-Unix machines); troff was 'typsetting roff' or thereabouts; I guess that nroff was 'non-typesetting roff'; tbl is a simple contraction of 'table'; eqn is a simple contraction of 'equation'; grap is a simple contraction of 'graph'(and why it was felt necessary to drop the 'h' remains a mystery to me); pic is probably just a simple contraction of 'picture'; refer is a simple contraction of 'references'; and chem is a simple contraction of 'chemistry' (or 'chemical', or ...).

Ideally, the name was short, (almost) pronounceable, and (if you knew the secret) at least semi-mnemonic. That still applies today, to some extent. Names of programs are chosen on any basis the author cares to use.


Directly answering the question - what command is missing (and has a whimsical name)...

$ dribbler -h
Usage: dribbler [-hV][-s sleep][-f file][-m message][-o openstr]
  -V           Print version information and exit
  -f file      Write to named file
  -h           Print this help message and exit
  -m message   Write message on each line of output
  -o openstr   Flags passed to fopen()
  -s sleep     Sleep for given interval between writes

It is an unenthusiastic counterpart to yes. Whereas yes writes stuff as fast as it can to the output pipe, by contrast, dribbler sends a dribble of information, enough to keep a process on the receiving end a little bit active, but not enough to inundate the system.


Another command of which I'm fond is bombard:

bombard - bombard a program under test with signals

 bombard [-s sig][-rvV][-t mintime][-T maxtime][-i iterations] -- cmd [args ...]

Bombard runs the test program designated by `cmd [args ...]' and subjects it to one or more signals. It can be used to do stochastic testing of the signal handling characteristics of a program.

The '-s' option specifies which signal is sent; the default is SIGINT. The '-V' option prints the program version number and exits. The '-r' option repeatedly sends the signal. The '-i' option specifies how many times the signal is to be repeated; the default is 1000 if '-r' is specified and '-i' is not. If the '-r' option is not specified, the flag has no effect. The '-v' option prints verbose information on the result of each run of the test program. The '-t' option specifies the minimum delay (in seconds) before signalling; the default is 0. The '-T' option specifies the maximum delay (in seconds) before signalling. The '--' separator is strongly recommended to separate the controls for bombard itself from the command and its arguments.

If only '-t' is specified, then bombard sleeps for the specified time and then sends signals to the process. If both '-t' and '-T' are specified, then bombard sleeps for a random amount of time in the specified range and then sends signals to the process.

Obviously, all the timing is subject to the idiosyncracies of the kernel scheduling algorithm.


Jonathan Leffler
"Practical Extraction and Report Language" is really a backronym; the name really comes from the Parable of the Pearl.
mipadi
The one I'd seen was 'Pathologically Eclectic Rubbish Lister'
ConcernedOfTunbridgeWells
Wish I could +1 mipadi's comment for use of 'backronym'
Adam Liss
Once upon a time, I understood that Perl was going to be Pearl, but there was already a language called Pearl,do Larry Wall dropped the 'a'. That could be urban legend, too. I do like the term 'backronym'.
Jonathan Leffler
+4  A: 
  • ed = EDitor
  • ex = EXtended (ed)
  • vi = VIsual (the :visual command in ex)
  • vim = Vi IMproved
  • vile = VI Like Emacs

  • TECO = Text Editor and COrrector

  • Emacs = Editing MACroS (For TECO)
Adriano Varoli Piazza
+6  A: 

The "more" utility was named because of the prompt after each page. The "less" utility is another pager app, so named because "less is more."

Mailers have a long history of funky names. Elm was "electronic mail." Pine is an acronym "pine is no longer elm." Balsa is meant to be light weight.

Not Linux, but the Mac OS X tool to glue multiple single-architecture binaries into a single multi-architecture binary (aka a "fat" binary) is called "lipo".

Sherm Pendley
Funny, I always assumed it's called "less" because you can scroll backwards (to see less of the file) as well as forwards. Great examples!
Adam Liss
+4  A: 

The Unix biff cmd (announce arrival of emails) was named after someone's dog who barked whenever the mailman arrived. http://en.wikipedia.org/wiki/Biff

Many other such interesting tidbits from the early days of computing can be found in The Jargon File. http://en.wikipedia.org/wiki/Jargon_File

SumoRunner
+2  A: 

About the mp3 encoder LAME, it stands for Lame Ain't an Mp3 Encoder :)

Davide Gualano
+1  A: 

The VMS style longwinded 'option=mode' commands to 'dd' were put in because somebody complained about the short cryptic options on unix commands.

Martin Beckett
+1  A: 

pic - text-based picture generation language front end to troff cip - GUI that read/generated pic files

The Blit terminal is NOT the Bell Labs Intelligent Terminal, but simply from the bitblt operation. The Mgr Window Manager is alleged to stand for "manager". When I started working with/on it, there were still people who called munger from the verb to mung(e).

plinth
+1  A: 

fsck = File System ChecK (note the previously documented rule of discarding all vowels and as many consonants as possible.

Most commonly used in my experience as profanity and I've only heard it pronounced in two different ways: "F-S-C-K" (i.e., lame) and "F-Suck" (correct).

Bob Cross
I have a third pronunciation to offer: "fisk"
Dave Sherohman
And "fossick", which is what it does around the file system, looking for problems.
Jonathan Leffler
I'v been pronouncing it as fusk
Matthew Scouten
+2  A: 

Let's not forget the "is not" recursive naming scheme:

  • pine = Pine Is not Elm (although one of the original authors denies this and it now officially stands for "Pine Internet News and E-mail")

  • wine = Wine Is not an Emulator

and of course:

  • GNU = GNU is Not Unix (although not a command per se)
Kit Roed
+3  A: 

tac lists a file in reverse line order, i.e. the output of cat backwards.

jamesh
Excellent! +1 for increasing my vocabulary.
Adam Liss
+1  A: 

This answer to the wedding cake question gave me a new insight on what's really the motivation behind those names ....

martial crontab:

# DO NOT EDIT THIS FILE - until death
# (/marriage/crontab.XXX installed on Sat Apr  4 11:26:10 2009)
# (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
0 21 * * * unzip; strip; touch; grep; finger; mount; fsck; more; yes; umount; sleep
hasen j
A: 

awk is named after the initials of its authors: Alfred V. Aho, Peter J. Weinberger and Brian W. Kernighan.

mouviciel