Top positive review
30 people found this helpful
Still One of the Best Unix and Linux References Available
on March 29, 2013
DISCLAIMER/DISCLOSURE: The publisher furnished me with a complimentary paperback copy of the third edition, as well as access to ebook versions. I have received no compensation for this review.
My review largely pertains to both the hardcopy/paperback version and the EPUB ebook version. I will point out where the ebook and hardcopy versions differ in this review. I do not own a Kindle or use any other MOBI format ebook reader, so your mileage may vary when reading the Kindle version of this book.
I have now read three editions of this book, and this third edition upholds the standard as the best distribution-agnostic Linux reference I have ever seen, out of dozens of Linux-related books I have read. It is in fact more than a reference, as most chapters serve as in-depth tutorials as well, such that starting at the beginning of a chapter that covers the subject matter you need to learn at the level of understanding you need, and reading to the end of the chapter, provides a solid foundation in that subject.
This is a book about practical skills with practical tools. It largely eschews the approach of many Linux books that describe the most immediate and obvious interfaces to accomplishing trivial tasks in a default install of a specific Linux distribution. Instead, it favors covering the core userland tools that are likely to be present in any Linux install, default or highly customized, addressing things like using shell builtins and pipelines to best advantage, applying the most universal (and sometimes least well-known) command line utilities to the problems for which they were designed, the basics of administration scripting, the most powerful text-processing editors available on Unix-like systems (specifically Vim, Emacs, and sed), and so on. These are not tools that will go away or be wildly modified beyond recognition in a later release. They are stable, highly functional tools, and you can rely on the skills you learn for using them not only across versions of your favorite distribution or multiple Linux distributions; you can also rely on them, generally speaking, when using other Unix-like operating systems such as FreeBSD or Solaris.
While the particular focus on GNU tools is regrettable, it is understandable given the prevalence of the GNU coreutils across Linux distributions, and when running up against minor differences between GNU utilities and alternatives (such as BSD utilities) a quick visit to the relevant manpage should clear up any problems quickly. Where manpages can be cryptic as a source of knowledge for someone newly learning to use a given utility, this book provides a gentler, but faster, introduction to common use cases, so that the user is ready to make use of the reference value of manpages more fully.
I've hinted at the usefulness of the book for more than just Linux here, already, and have made more explicit mention of it in reviews of earlier editions. I am in fact a FreeBSD user more than a Linux user (and favor OpenBSD for router/firewall systems), but I still find A Practical Guide to Linux Commands, Editors, and Shell Programming a valuable reference even when working in a FreeBSD environment. The second and third editions add to this specific coverage of the ways Apple MacOS X differs from popular Linux distributions, enhancing its cross-platform value (though I personally would appreciate coverage of BSD Unix systems more).
Some specific observations deserve attention:
The third edition marks the first time I have tried reading the book straight through from beginning to end, skimming some areas a bit but carefully reading most of it. This reveals the limitations of the book's organization as well as its strengths. It is clearly not meant to be read directly, linearly from cover to cover. There is a lot of repetition in this approach to using the book. That repetition lends to the strength of the book as a series of stand-alone tutorials, however, and helps ensure that use as a reference does not force the reader to flip through pages to different sections of the book to get the full picture when looking up a particular item. Use the book as it is designed to be used, and it will serve you admirably; read it as a linear text with a beginning, middle, and end, and you may find it dry and repetitive.
In areas outside its core competence, the book falls a bit short of ideal. Take care to recognize such topic areas, and take the advice and lessons offered in those areas with a grain of salt. The core competence areas of the book, of course, are those mentioned in the title (commands, editors, and shells) or in chapter and appendix headings (basic Perl, filesystem, and regular expressions). Areas outside of the book's core competency where I have noticed problems include its attempts to describe licensing, explain the history of Linux and other open source software systems, and refer to conventions of less Unix-like systems such as calling a desktop environment "Desktop manager". It also manages to give bad security advice in a password sidebar, explicitly telling users that there are times where it is better to use a single password for a number of different authentication contexts (e.g. multiple websites) as opposed to offering actually good advice like using a password manager.
Some information has been allowed to get out of date in newer editions. One example is that of debuggers, where the book refers to "debuggers, including ups and gdb". The ups debugger saw a beta release in 2003 and seems to have been abandoned since then. The book meanwhile fails to mention LLDB, the debugger built for LLVM/Clang (the major competition for GCC in the open source C and C++ development world, and widely regarded as the superior C compiler). LLDB was announced two years before the third edition's publication date. Of course, in a book with the size and information density of A Practical Guide to Linux Commands, Editors, and Shell Programming, it is not surprising that some details like this might be overlooked, but it is still worth noting that such oversights exist.
Just about every book in the world has grammatical problems -- many of them the kinds of problems that very few people realize are problems at all. This one is no exception, though they rarely descend to the level of confusing the reader. One example that does potentially confuse a reader is the sentence in the explanation of the w command that reads "The third column shows the system that a remote user is logged in from," where the construction of that sentence could lead a reader to think it was saying something equivalent to "The fact that a remote user is logged in is shown to the system by the third column." (The intended meaning was "The third column indicates the system from which a remote user is logged in.") Thankfully, such misconstructions are rare and easily sorted out on a second reading.
Vim is an incredibly powerful text processing tool, and a single effect can often be achieved any number of ways. As such, any attempt to present Vim functionality to new users will almost certainly end up doing some things in ways that can be criticized. This book is no exception to this, despite the fact it does a very good job of helping the user learn how to make use of Vim functionality. One example is the fact it completely overlooks "c" commands in Vim, describing how to achieve the same effects in a less efficient manner, as well as overlooking the use of the "e" movement command with "d" commands for word deletion.
Some minor inaccuracies suggest the author's preferences. For instance: "With emacs, however, you can have many work buffers and switch among them without having to write the buffer out and read it back in." The same applies to Vim, so the use of the word "however" here is misleading.
The book appears to be straying from its singular purpose, which I find disappointing, as particularly demonstrated by the addition of a chapter about MySQL:
There is an entire chapter about MySQL. In a book titled "A Practical Guide to Linux Commands, Editors, and Shell Programming" I have to wonder what this chapter is doing in the book. It is a handy reference, I suppose, but it is in the wrong book. If any databases were to be addressed here, better choices for the subject matter of this book would have been bdb, dbm, and SQLite, as any of the three (least of all SQLite, but that would still be better than MySQL) is much closer to being relevant to the core subject matter of this book. As with the Unix philosophy -- much ignored and violated in the Linux developer community lately, but still important -- the book should have stuck to its pattern in earlier editions of adhering a bit more to the "do one thing well" aesthetic. What this book has always done well is focus on the fundamentals of managing and using a Unix-like system, covering it with a fair level of comprehensiveness and depth but still sticking to the important core value of command line Linux system use and administration. With this expansion into the realm of database administration, it departs from that worthy purpose. Nothing appears to have been cut from the book to make room for the MySQL chapter, and in fact the page count continues to increase from edition to edition (despite the fact that thinner paper results in a thinner book), but diffusing the focus of the book with coverage of topics notably outside its obvious intent and core competency does one of the best books I have encountered for use as a Unix-like operating system user's reference a distinct disservice. The space could have been better spent adding coverage for BSD Unix systems, introducing the reader to console-based alternatives to GUI applications, and incorporating information about newer and better designed alternatives to old tools such as LLVM/Clang (as a GCC alternative) and tmux (as a GNU Screen alternative).
It even gets the description of MySQL, as "the world's most popular open-source relational database management system", wrong. That distinction easily goes to SQLite, which has managed to work its way into so many systems without many people realizing it is there that it beggars the imagination. Even the highly popular Firefox browser makes use of SQLite.
Some EPUB format observations should be noted:
In the font used for sidebars in the EPUB, backticks and single-quotes (i.e. apostrophes) look essentially identical, which can contribute to reader confusion. Knowing this in advance should, I hope, help readers ensure they do not suffer much frustration in making use of the ebook text.
Page number references within the EPUB seem to be entirely inaccurate, at least most of the time. For instance, a reference to "File Locks" on page 171 is a link to a "File Locks" section in the book that appears on page 213 of the EPUB, according to the ebook pagination.
The way tables are rendered in the EPUB, the text is small enough that screen resolution is likely to fail to produce readable text on many ereaders. It certainly did on mine.
The sidebars are so narrow in the EPUB as to appear absurd, a thin column of text between wide swaths of blank space rendering it odd -- and somewhat difficult -- to read at normal speed. Code samples are even worse, not because they are more narrow, but because the haphazard linewrap consequences make it even more exceedingly difficult to read them than it is to read the normal textual sidebars.
In some cases within the EPUB, the caption for a table is on one EPUB page, and the table itself does not start until the following EPUB page.
Thanks to sidebar placement issues in the translation from print layout to EPUB, sometimes the relationships between different pieces of text end up "wrong". For instance, in a discussion of shell PATH variables, a parenthetical remark reads "(but see the preceding security tip)". Unfortunately, the security tip in question is on the following page -- not a preceding page.
The EPUB is missing a lot of information that is available in the hardcopy book. For instance, two references to "nullglob" on page 353 lead to page 392 of the EPUB, which contains the note about the "shopt" option setting builtin from page 351 of the hardcopy book. The "nullglob" entry one is intended to find from those references is missing from the EPUB, along with about three pages of other bash options in a short reference section in the hardcopy book.
The font used for inline code samples in the EPUB is pretty bad. It is not fixed width, and causes problems like two minus tokens in quick succession in a postdecrement operator to appear as one long dash character, like an em dash.
Some advice in the book runs afoul of personal peeves, such as the programming language tip about tcsh:
A tip sidebar in the book says "Tip: Do not use tcsh as a programming language". It goes on to give the advice that tcsh is not as good a "programming language" as bash, and that if you are only going to learn one shell "programming language", you should learn bash. While I agree that one should not use tcsh as a programming language, I also believe one should not use bash as a programming language, and that anyone who is really and truly only going to learn how to use one shell for admin scripting, that person should actually learn sh (POSIX or Bourne shell) instead. Note that this is not because sh is a good shell. For interactive command shell use, it is in fact a fairly miserable excuse for a shell these days, having been superseded by superior interactive command shells such as tcsh and mksh. Some find shells such as zsh even better than those, though zsh is too heavyweight for my taste. As an interactive shell, however, bash gives you all the heavy, ponderous, unwieldy resource-consuming operation of zsh while falling well short of zsh capabilities. The reason sh is the best choice if you are only going to learn one shell, however, is that it should be used for simple shell scripting because of portability concerns (every Unixy system has some kind of sh implementation on it, but many lack csh, tcsh, zsh, bash, or ksh implementations, for instance). Furthermore, no shell should be used for less trivial scripting such as would be suitable to languages like Perl, Python, and Ruby (two of which are covered in their own chapters of the book), due to the fact that stretching the capabilities of even the most sophisticated interactive command shell implementations with the extended feature set of something like zsh will only result in largely unmaintainable disaster areas in the source of your misbegotten "applications". Stick to a programming language actually designed first and foremost for programming when you want to do anything nontrivial (and even a lot of things that are trivial), and stick to sh for glorified batch execution scripts. The rule of thumb should be "If you need something more than sh, you need something more than any command shell syntax." It should absolutely not be "Use bash instead of tcsh because bash has more badly designed features than tcsh."
Despite some minor warts, this is still overall one of the best books for users of Unix-like systems in general that I have ever encountered. In fact, in many ways it is consistently getting better. A massive tome at a thousand or so pages in any edition, each edition has actually gotten longer with the addition of yet more information, and even as the page count has increased the paper quality and narrowness of binding have improved as well. I recommend it without hesitation for use as both a reference and a collection of valuable tutorials for fundamental Unix-like system usage skills.
Given the problems I have noted in the EPUB version, I strongly recommend getting the hardcopy version when choosing a version to buy. By the time you read this review, however, some of the ebook issues may have been corrected.