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:
catis used to catenate files. It has been superseded bydogin some distros.sshprovides 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!
-
MCI = 1101 in Romans Numerals... I never clicked that until just now :)
Gamecat : The obvious is often overlooked. +500 Geekpoints!Adam Liss : +1 for being awake before I've had my coffee! Take a look at the 800 number on cans of Coke products. :-) -
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.
Jason Baker : Well less IS more after all.agnul : And then there's most... :-) -
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.
Adam Liss : +1 for the history lesson--which is what I'm hoping to find in these answers! -
sed= stream editor ... but I can't help thinking, That's not what I sed! Coincidence? -
zsh was the login of its author Zhong Shao
-
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 :-)
oliver : In the moreutils package, there's also a "pee" command: "tee standard input to pipes"Jonathan Leffler : I have a minor variant on 'byacc' - the Berkeley YACC - that I call 'kayak'. -
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.
Rich Bradshaw : It's true. internet download => web get => wbgt => wgt => wgetAdam Liss : +1 for posting the first algorithm. -
grepwas from the ed command, g/re/p or Globally search for Regular Expression and Print.yacc, of course, was Yet Another Compiler Compiler.perlwas Practical Extraction and Report Language (see also the comments).roffwas a simple contraction of 'runoff' (a similar system that existed on other non-Unix machines);troffwas 'typsetting roff' or thereabouts; I guess thatnroffwas 'non-typesetting roff';tblis a simple contraction of 'table';eqnis a simple contraction of 'equation';grapis a simple contraction of 'graph'(and why it was felt necessary to drop the 'h' remains a mystery to me);picis probably just a simple contraction of 'picture';referis a simple contraction of 'references'; andchemis 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 writesIt is an unenthusiastic counterpart to
yes. Whereasyeswrites stuff as fast as it can to the output pipe, by contrast,dribblersends 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.
mipadi : "Practical Extraction and Report Language" is really a backronym; the name really comes from the Parable of the Pearl.ConcernedOfTunbridgeWells : The one I'd seen was 'Pathologically Eclectic Rubbish Lister'Adam Liss : Wish I could +1 mipadi's comment for use of 'backronym'Jonathan Leffler : 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'. -
- 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)
-
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".
Adam Liss : 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! -
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
-
About the mp3 encoder LAME, it stands for Lame Ain't an Mp3 Encoder :)
-
The VMS style longwinded 'option=mode' commands to 'dd' were put in because somebody complained about the short cryptic options on unix commands.
-
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).
-
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).
Dave Sherohman : I have a third pronunciation to offer: "fisk"Jonathan Leffler : And "fossick", which is what it does around the file system, looking for problems.Matthew Scouten : I'v been pronouncing it as fusk -
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)
-
taclists a file in reverse line order, i.e. the output ofcatbackwards.Adam Liss : Excellent! +1 for increasing my vocabulary. -
This answer to the wedding cake question gave me a new insight on what's really the motivation behind those names ....
# 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 -
awkis named after the initials of its authors: Alfred V. Aho, Peter J. Weinberger and Brian W. Kernighan.
0 comments:
Post a Comment