Unix in a Nutshell
Greetings, all. This week I'll be "reviewing" one of the books that made the O'Reilly name, UNIX in a Nutshell, although I admit to feeling a little silly passing judgement on a book that has already been judged quite well by the community at large. The first edition of this book was published in December 1986, and has been a mainstay ever since. This particular version is dated June 1998, and professes to include typographical fixes and a new index. For reference, in December 1986 I was working on an IBM PCjr expanded to 640k of RAM and dual 360k floppy drives. My favorite games were Karateka, Flight Simulator II and F-15 Strike Eagle (the first one). How far we've come....
What's the book about?
Simply put, this book is a dictionary of UNIX. It lists every command
available with a standard System V, Release 4 or Solaris 2.0 UNIX. This
included everything from grep to ed to cc to troff. If you know a command
exists, it's listed here along with all its options. That, however, is but a
small part of the book. In addition, there are various specific sections
covering shells (including sh, ksh and csh), EMACS, vi, ex, awk, sed,
nroff/troff, mm/ms/me, various nroff/troff preprocessors, RCS/SCCS, make,
sdb/dbx, plus a small beginner's list of important commands. In other words,
this is the jack of all trades reference for UNIX (and by extension, the
master of none, although I'll cover that later). There is also a transition
guide (or at least a small blub) for those used to BSD instead of SysV (of
which Linux is a decendent of the later). Many BSD commands included in /usr/ucb on Solaris are listed in the guide as well. In short,
if it's standard UNIX (and then some), it's here.
If you want a kitchen-sink reference to UNIX, this is it. Any command that you have a question about is in here. Anytime you have a question about which vi command is needed, it's in here. Shell scripting is covered. Regular expressions are covered, for when you forget when to use "?" and when to use "*" (or "^" or "$"). Want a quick overview to RCS for your web files? It's right here. This is the short, short version of all your man pages that you can put under your pillow at night.
What's Bad?If you don't know much or anything about UNIX, don't buy this book. Or at least buy an introductory one along with it. Trying to learn UNIX from this book is like trying to learn English by reading the dictionary. Not only is there not much context, you can't do a reverse lookup. If you can't guess at the command you want, you won't be able to find it. That's not necessarily a flaw, this book just wasn't designed to do that. You don't buy the OED for a Spanish speaker, and you don't buy UNIX in a Nutshell for a newbie. In addition, don't buy this book just for its EMACS or vi or RCS section. Those sections are nice, but they are more command lists than guides. O'Reilly has an excellent selection of books dedicated to helping you with one of the above programs. They're great, and I recommend them.
What's In It For Us?Long-time UNIX fans will love this book, and probably already own a copy. Same with sysadmins. If you've been around enough to know what you're doing, but still have to look up commands, this is also a great book for you. I know I can never remember half the EMACS or vi commands when I need them. The community has voted, and this reference is it. If you need it, buy it.
Buy the book at Amazon.
This is the dictionary. I've had one since the early nineties and use it regularly. I always have it when I teach a Unix related class as it leads me out of the wilderness.
MY GIANT PROBLEM WITH THIS BOOK IS THAT I BOUGHT IT AS A NEWBY FOR $10. Now it's more than doubled in price.
This was a great gateway drug^H^H^H^Hbook to recommend to friends a little interested in Unix. It is a wonderful general reference for people who wanted to learn more and were willing to put in a little effort. It is easy to give or lend someone a $10 book. I normally have two, one to lend and my old faithful.
THE NEW PRICE _HACKS_ _ME_ _OFF_. I'm looking at a bookshelf of O'Reilly books that I bought. The rest of the documentation I've got is system docs from vendors and gifts of variable merit.
If O'Reilly needs the cash, they picked the wrong book to get it from.
Allen Buck
Unix systems programmer
Digital Unix, Irix, Linux, sunos, Solaris, HPUX, ConvexOS, UniCOS, AIX, AT&T Unix.
Actually, he was correctly pointing out that both books are factual. One heals the mind, the other heals the soul.
Nice little rant....
However, the point I was trying to make is that you simply cannot rely on man pages or info or whatever being accessible if you work on a variety of systems. I didn't know about POSIX, but I've installed enough AIX to know after you THINK you are done installing your system, find an experienced admin to help you get man pages installed. BTW embedded systems could give a rat's ass about POSIX or indignant sysadmins anyway....
Onto my own little rant: Unix is NOT there for the elitist snobs to stroke their own egos, it's there to get some fucking work done. I agree that IDEALLY there should always be a complete set of online documentation, but IDEALLY communism works! (Ala Homer Simpson)
So Unix in a Nutshell isn't REALLY required, but neither is the remote control to my TV. I'm not giving up either.
Anonymous Scribbler
Geez, Tom, I don't mean to be pissing vinegar you're way, but lighten up.
Yes, some Unix docs and Linux documentation in particular sucks ass. I WHOLEHEARTEDLY AGREE, but that's the way shit works. NOBODY bothers to write shit down the first time around (and I mean NOBODY).
Am I making excuses for this? No. But don't be offended if I call your attitude a little bit purist. If Unix in a Nutshell is the technical equivalent of a Big Mac when a finely grepped manpage is cavier, then I am guilty of BigMacAttack in a big way. However, I am typical of a whole class of users trying to buy into the "Unix Philosphy." Books like Unix in a Nutshell and Sobell's Practical Guide to Unix will be INSTRUMENTAL in changing paradigms. As much as you piss and moan about online docs, take a look at the average Windows help file. It's crap. So what does the average joe user do? He goes and buys and book to clue him in. When Joe User discovers Unix, he will probably take that book-buying paradigm with him. Is that evil? The foreward to Sobell's guide to Linux is by none other than Linus Torvalds! Sobell's book helped Linus learn Unix. Is he part of the post-literate masses?
More importantly Tom, you are guilty of an ad hominem attack on most of the human race! My boss just came from a stint at the University of Utah where he was doing IT work for, among other things, the Human Genome project. Almost everyone he worked with has a PhD, but they needed daily handholding and asswiping to use Macs! Does that lessen the importance of their work? Experience has taught me that despite my love for the arcane, other folks might have different work to do. You twisted my comments into the tired:"look at the GUI morons!" flamewar. I spoke of REALITY, and you spewed back with a holier-than-thou diatribe.
Lastly Tom, an ad hominem back at ya. How fucking greppable are YOUR published books. I'm assuming they're all in publicly available TeX format so everyone can join in the fun. Why even publish a book at all, when with folks like you, the perl docs are obviously the epitome of completeness and perfection?
Anonymous Scribbler
Excellent summary of the situation, the problem, and what should be done about it. Personally, I'd like to see your posting featured as a main article on Slashdot, not just a comment on a book review.
The GNU info scheme is the biggest backward step I've seen in many,
many years of documentation.
BTW, when the reviewer said:
`Not only is there not much context, you can't do a reverse lookup.'
ptx should have been used to generate a permuted index. The permuted
index for the old level 7 Unix did not require a vast number of pages
to cover everything. It is really strange how ptx use has practically
died out, and the ptx macros themselves basically disappeared.
Regards,
luke
Man pages are too-kitchen sink for the clueful-newbie.
Also, manpages aren't required in SysV (they're a BSD-ism) so you can't expect them in all systems, like embedded or vertical market machines.
Hell, even GNU disses manpages in favor of "info"!
Posted by d106ene5:
However, the point I was trying to make is that you simply cannot rely on man pages or info or whatever being accessible if you work on a variety of systems.
Then what good is Unix In A Nutshell to you anyway? Of course manpages are not available on the Mac - in which case Unix In A Nutshell won't be of much use either.
Tom's point is valid. On unix systems you should be able to find manpages.
Posted by d106ene5:
This book provides information that can almost entirely be derived from man pages. It adds very little to system documentation already in place (that any unix user should be comfortable using).
There is also a transition guide (or at least a small blub) for those used to BSD instead of SysV (of which Linux is a decendent of the later).
Linux isn't a direct descendant of SysV at all; in fact, that's part of the point behind it. Also, while Linux may have SVr4-ish modules and init(8), the userland is BSDish/GNU all the way -- go to (say) Solaris from Linux or *BSD and the SysV-ness of it will bite you if you aren't ready for it, especially with commands like ps and the printing subsystem.
-lee
I have both UNIX and Linux in a nutshell. My UNIX is dated August 1994.
To be honest I've rarely used them. I usually find the installed man pages more up to date, and enjoy being able to search for a command option.
But I have them nonetheless.
--
Marc A. Lepage
Software Developer
So let's pick it apart piece by piece
I see no reason to review a book that's such a staple in the unix community such as this, and pass it off as being 'new' or 'unknown'..
On the /. front page the article is described as a review of 'one of the O'Reilly staples'. In the first paragraph the author states he "feels silly" reviewing a book that has already been approved and used by so many. I hardly think that is passing the book off as new or unknown. I'm surprosed it has taken so long for this review to appear on /. I suspect one of the reasons for the review was because it hadn't been done yet. Why climb a mountain that's already been climbed before? Because it's there.
I feel uneasy when commercials for books like this one start sneaking into the realm of 'actual interesting content'
The 30 other posters (at time of writing) would seem to disagree. The review has prompted discussion on various topics: UNIX documentation, man pages vs books, ORA books vs others. To me this is pretty interesting content.
There's a lot of money to be made by pointing at a very good book that a lot of nerds might be interested in, and convincing them to buy it through a money-making portal. At the same time, it's annoying to those of us who see it as a clear-cut way to make some money off of hard working geeks who may not know they're being led by the pied piper of geekyness - Slashdot.org.
You poor bugger, you've obviously been tricked by Evil Rob and his henchmen before - don't tell me you bought the book about the ducks and you're pissed off because everyone's favourite website (malevolent as it is) got 3c of your hard earned dosh.
Fortunately I have never been a victim of the dark Jedi incantation "Buy it at Amazon". Please give /. readers some credit - we aren't stupid. If we buy a book we buy it because we want it not because /. told us to.
Rob, Jeff and co put up this site because it is a cool thing to do. They want to make it as cool as possible - which costs money. So they sell banner ads and join a couple of affiliates programs. It doesn't cost me a single cent. Nor anyone other /. reader.
Posts that complain about the very necessary advertising and Amazon/CDNow links are ultimately a waste of time. Without the ads there would be no /. If you feel that strongly about them don't read /.
OK, I'm done now
my blog: good times, man, good times
> This book provides information that can almost entirely be derived from man pages
That's what a desktop reference is. The point is that each entry is boiled down to the most important details. It doesn't pretend to be complete documentation of everything. To take a random example, man ps on the HP box I'm sat in front of at the moment runs to 8 or 9 pages. The Unix in a Nutshell entry runs to 24 lines. Chances are I'll find what I want quicker in the book.
This book travels with me to every job I go on - it's probably the best pure reference book I own. It's a top book and a bargain (even if, like me, you never have and probably never will use the nroff/troff section).
As the review points out, Linux adopts many conventions from SVR4, so I would recommend this 'Nutshell ...' over the Linux specific one.
I also like the troff reference - don't laugh, I
still use it for simple documents that can't justify full typesetting in LaTeX.
Chris Wareham
And, as for learning C programming, once you know the basics, you can go far reading the man pages/RFC's. I'm currently working on a password changing daemon (called from inetd) and I'm learning most of it as I go along through the man pages and a little help from DejaNews.
--
Hrm, maybe I should. The point still stands that different unices use different commands; some of the gnome installation scripts fail on Solaris unless GNU grep is installed; the book possibly wouldn't cover such a variation.
--
I agree with you there... the prices for these books are outrageous! It makes me wonder though who gets all the money from these ventures as most of the books this program finds on the web average about 40% off of list price. I suppose though that O'Reilly does set the list price but if these companies can still make a profit selling it for 40% of that something is definitely wrong.
Nevertheless, O'Reilly does have a corner on the market as the leading distributor of technical books so I suppose they can abuse their monopoly like everyone else. Luckily we can exploit the competition between vendors using automated programs on the web and overcome the waste.
-----------
Resume
Football Sports Contest - Win $500 for having an e
Nevertheless...
The book lists for a whopping $24.95 and if you get it from Amazon you only pay $19.96. Through the help of other /. readers I have a program on the web that found it for only $12.95 (48% OFF) from powells. If your interested the source code is available in a developers edition and you can find lowest price here:
Unix in a Nutshell
The program speciallizes in O'Reillys but you can find any book. Each night I build a list of every O'Reilly and with one click you can find the cheapest price.
-----------
Resume
Football Sports Contest - Win $500 for having an e
Except MY PCjr only had 512k of RAM and a single floppy, and you had to shuffle disks back and forth. Ah, good old proprietary IBM. When was the last time you saw a computer with a cartridge slot? You know, I think I still have GW-BASIC on a cartridge sitting around somewhere.
Sorry... Off-topic, but I couldn't resist.
I remember buying this book when I went back to school in 91. Contrary to the review, I did teach myself Unix from this book. (Although I probably had some *nix background from my VAX account when I first went to university back in the 80s.) None of the kids (that I met) coming out of high school had a clue what they could do with a shell account. Gopher, LYNX, PINE, the good old days. I lent that book to everyone from Comp. Eng. friends to cute girls in Psych. Sadly, I lost track of it. The company library has a copy, but I am thinking I may get a copy for nostalgias sake.
Laugh while you can, monkey boy!
Agreed.
It's a big, fat, reassuring book, and it resists coffee stains nicely. I have a copy at work, and due to strange circumstances, we have two copies at home.
Even if you don't ever need to dip into, it's nice to know it's there, just in case. Possibly my favorite of all the ORA books so far (OK, so you might argue that the Bat Book is more of a lifesaver, but it just scares me).
I have to add myself to the list of people who did indeed learn basic Unix mostly from this book. In 1993 or so, this was my first Unix book, and it made a nice replacement for the pages of hand-written crib notes I had been using to teach myself to use the various shell commands.
I tend to think of this book as "man pages lite" - if you have and know how to use the real thing, this book will probably just gather dust on your shelf, but if you don't have good man pages, or are new enough to be daunted by their presence, this book can be a good reference to flip through in search of commonly used bits of info. While there is no "reverse lookup" per se, the text is light enough that there's a lot to be learned just by casual browsing.
Of course, while this book will teach you Unix commands, it will do very little to teach you Unix - there's very little talk of things like the theories of pipes, job control, the architecture of the filesystem, etc. other than what can be gleaned from the relevant commands - but this isn't the same thing as a discussion of how and why things work.
Also, as others have mentioned, there *are* various flavors of this book (I think I've seen Linux in a Nutshell, Solaris in a Nutshell, and BSD in a Nutshell)...
Does anyone think it might make sense to use make SGML the new standard format for manpages? It seems to solve nearly all of the problems associated with both troff and texinfo.
With SGML, you can write manpages to be displayed as hypertext (convert it to HTML) on multiple pages or one long page (for searching). You can convert it to TeX/LaTex for attractively printed documents. I think I've even seen a filter to which convert from SGML to troff for use in a normal man page (I don't know if anyone's written anything to convert troff to SGML).
Is this the kind of thing that you'd need to submit to POSIX if you wanted it to be considered for a standard?
I find Essential System Administration (also from ORA) is the absolute bomb.
If your looking for a good UNIX reference that is a great book.
its a great 'practical' reference and worth every penny.
figured I would throw that out if your planning to buy a book on system administration to act as a UNIX reference this is definetly what you should get.
I suppose I shall reply to you in the same manner. On the /. front page the article is described as a review of 'one of the O'Reilly staples'. In the first paragraph the author states he "feels silly" reviewing a book that has already been approved and used by so many. I hardly think that is passing the book off as new or unknown. I'm surprosed it has taken so long for this review to appear on /. By "new and unknown" I am simply describing the actual format that slashdot takes on. It is the essence of slashdot to reveal the 'new and unknown' to the public, that's what news is. Unix in a Nutshell is not news. Why exactly would the author feel silly writing a review unless it's completely unnecessary? I would feel a 'little silly' if I went out and decided to go and review Michael Jackson's Smash-hit LP "Thriller" for Rolling Stone.. and rightly so.
I suppose I shall reply to you in the same manner.
/. front page the article is described as a review of 'one of the O'Reilly staples'. In the first paragraph the author states he "feels silly" reviewing a book that has already been approved and used by so many. I hardly think that is passing the book off as new or unknown. I'm surprosed it has taken so long for this review to appear on /.
/. If you feel that strongly about them don't read /.
On the
By "new and unknown" I am simply describing the actual format that slashdot takes on. It is the essence of slashdot to reveal the 'new and unknown' to the public, that's what news is. Unix in a Nutshell isn't new, nor is it unknown. It's not news. Slashdot can post whatever they want, but I can tell them when they're being lame.
Why exactly would the author feel silly writing a review unless it's completely unnecessary?
I would feel a 'little silly' if I went out and decided to go and review Michael Jackson's Smash-hit LP "Thriller" for Rolling Stone.
This makes logical sense.
Posts that complain about the very necessary advertising and Amazon/CDNow links are ultimately a waste of time. Without the ads there would be no
Bah.. I hate that.. "this is my country love it or leave it"... "this is my slashdot, love it or leave it." That's a really pathetic argument.
I wouldn't visit slashdot if it wasn't interesting, I just noticed something extremely lame, namely the book review, and commented on it. You can tell me the worth of my comments, you can also be wrong.
You're doing your part to sufficiently accomplish both.
EXCITEMENT IN THE MOUTH!!!!
As opposed to "The Practice of Programming" previously reviewed, I see no reason to review a book that's such a staple in the unix community such as this, and pass it off as being 'new' or 'unknown'.. I search for a point to all of it, and basically the only thing I can come up with is Amazon.com credits for Slashdot and friends.
I can deal with commercials when they're clearly commercials, but I feel uneasy when commercials for books like this one start sneaking into the realm of 'actual interesting content'
There's a lot of money to be made by pointing at a very good book that a lot of nerds might be interested in, and convincing them to buy it through a money-making portal. At the same time, it's annoying to those of us who see it as a clear-cut way to make some money off of hard working geeks who may not know they're being led
by the pied piper of geekyness - Slashdot.org.
this is the bedside volume which will be collecting dust in gibson-esque style roadside tech hotels of the future.
modern day companion to the book of genesis.
BLAMMO shaken not stirred
You need to install a newer ps...
$ uname -a
Linux Q 2.2.7 #1 Thu Apr 29 16:44:49 CEST 1999 i686 unknown
$ ps --version
procps version 1.9.0
$ ps -Af
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 May03 ? 00:06:23 init [2]
root 2 1 0 May03 ? 00:02:34 [kflushd]
root 3 1 0 May03 ? 00:03:13 [kpiod]
root 4 1 0 May03 ? 00:06:24 [kswapd]
root 11 1 0 May03 ? 00:05:04 update
Living is a horizontal fall
Unfortunately, technically speaking, only catpages not manpages are required. Perhaps that's what you meant. But even catpages are better than nothing.
This hardly constitutes a fine selling point in your favor. Sometimes the FSF pertains more to the problem set than they do the solution set; this is certainly one of those places. Not only do they ignore the POSIX requirements, they appear to disavow the need for a unified, indexable, searchable, printable, formalized set of technical documentation. This is hardly what most of us would call `progress'.It's bad enough when you summon up a manpage only to be infuriatingly chidden by the FSF that `This documentation is no longer being maintained and may be inaccurate or incomplete.' Worse still is the situation with programs like diff or gnomecal, which are completely bereft of any manpage whatsoever. The FSF should be ashamed of themselves! This is one of the root causes of the notorious Daemon Linux project.
This lackadaisical attitude toward complete, on-line documentation is hardly confined to the FSF, although I hold them ultimately responsible for one area: Linux distributors. The Linux rebundlers inherit the problem from the FSF, and do nothing about it. Take SuSE for example. In virtually all other aspects a robust and coherent Linux distribution, SuSE confesses in their printed book that accompanies their CD that not all commands and functions have documentation. What a punt! They're just being irresponsible.
I suppose that one could in desperation invent some sort of rarefied alibi for the FSF's negligence here. They are, after all, more dedicated to principle than they are to mundane matters of quotidian utility. But for those who repackage and sell Linux distributions, no excuse can exist. These businesses are selling what they purport to be an integrated system, yet then have the audacity to confess that it is not. If the FSF won't fix this, then the resellers must. But the FSF really is the right place to fix it, because that way the fix helps everyone, rather than just one reseller trying to create a market advantage for themselves.
But this already depressing situation gets worse, far worse, before it gets better. You see, as programmers try to create something flashy enough to attract non-programmers, something critical has been lost. I'm thinking of those programs whose GUIs are the Way, the Truth, and the Light, whereby no man cometh unto the documentation for a given program save through its lauded GUI. If the information is not found under an About button or a Help button, it simply isn't available. Even if it were to be found there, how would you know it? Once you figure out each program's new set of hieroglyphics, these miserable shinyhappy icons and their cascading shinyhappy menus just aren't greppable. How do you in a non-manual fashion search through these myriad menus? How do you print them out? How do you create an index?
This situation in completely unacceptable.
Having recently tried out the whole Eterm, Enlightenment, and Gnome set-up, as duly impressed as I was with Eterm's manpage, I was severely underwhelmed by the attention toward detailed -- strike that, make it any -- documentation manifest in the other two. Miguel has assured me that what I had looked at was a mistake, that the released snuck out without the libraries' docs included. But I want more than only the programming libraries having manpages. If it's a command or a file format, it needs to be documented! Otherwise we're back to the mushroom school of systems management (keep us in the dark and feed us shit). Every little gnomic panel application and associated happycon needs a manpage, one that apropos and whatis can access, as well. Don't make me click with a mouse to find help and directions. I didn't spend thirty years mastering the keyboard and learning to read and write lengthy treatises merely to be reduced to a one-bit input device and a two-line output device.
Having to randomly hunt through manpages, HOWTOs, info pages, various programs' home pages out on the Web, per-program help pages, and stringsing the infernal binaries is shear madness As Henry Spencer observed, `Those who do not understand Unix are condemned to reinvent it, poorly.' Unified Unix manpages solved the insane situation in which you had shelves upon shelves of printed documentation that came with an IBM mainframe; these docs weren't online, so were unnavigable. Apparently we are doomed to repeat that unhappy history.
While it's true that I write all my books in troff, along with the traditional helpmates of eqn, pic, and tbl, please don't assume by this that I am particularly enamoured of that system. I'm certainly not. What I do expect in proper online documentation is the properties that manpages provide:
- All documentation must be contained and accessible from within the same on-line system.
- Available for independent on-line viewing, apart from the application.
- Format easy to read and write by humans, parse and generate by programs.
- Conveniently structured.
- Printable as a high-quality book using a typesetter.
- Searchable and indexable using standard tools.
The language used to encode this information is far less important than is having these basic features. Without a coherent, comprehensive, and unified documentation system, we might as well all be running some expert-hostile and user-obsequious toybox suitable for the point-and-drool atechnical public all too typical in these post-literate Dark Ages, where WYSIWYG means that what you see is all you get.--tom