Slashdot Mirror


Review: The Linux Cookbook

Craig Maloney writes with this review of The Linux Cookbook, a hope-inspiring entrant in the still too-small category of generalized, readable references for non-programmers, as well as the even-smaller category of books with a complete free version online. Craig's found some flaws as well as bright spots, but it still sounds like a good book to check out for users who aren't sure which FM to R, no matter what their level of experience. The LinuxCookbook author Michael Stutz pages 300 publisher No Starch Press rating 7 reviewer Craig Maloney ISBN 1-886411-48-4 summary Hundreds of answers (with a focus on the command-line) to commonand not-so common questions.

Allez Cuisine!

The Linux Cookbook is a collection of "recipes" for doing various tasks with your Linux machine. Where the Cookbook shines, though is the sheer number and variety of these recipes. There are plenty of varied tasks covered in the book, from the simple 'How do I copy a file?' to the more complex 'How do I archive a web site?', Six chapters deal with the various aspects of text: analyzing, searching and replacing, grammar checking, and formatting. There are even chapters dealing with the less-explored topics of customizing X, setting up reminders, and editing sound files.

Recipe Format:

The recipe format is both the book's strongest feature and its weakest point. The recipes make for a well-organized and logical structure to find information. Each point and sub-point is clearly marked, and makes for a very quick and enjoyable read. Unfortunately, topics that could benefit from a different approach are just not covered thoroughly. In the section for listing files, ls is well covered, while Midnight Commander is briefly introduced. This wouldn't bother me as much, except Midnight Commander and Mozilla URLs are given at the beginning of the section. This presentation could also lead people to think the material presented is the only way, or the best way to do these commands. There is only one method mentioned for shutting down a Linux machine; the venerable CTRL-ALT-DEL. No mention is made in the book of the shutdown command. Granted, CTRL-ALT-DEL will get the job done, but I'm not sure I would have presented it as the best, or only way to shut down a Linux machine. [T - Especially when on many distros, CTRL-ALT-DELETE is configured to restart rather than shut down the machine; this behavior, though, is configurable through /etc/inittab.]

Season to taste:

As I've mentioned in the previous section, some of the commands the author chose as his answers are quite curious to me. In the section to find hostnames from IP addresses, the author has chosen to use the command "dig" rather than the command I generally use "nslookup". Granted, "dig" gives other useful information aside from the IP and hostname, but the author doesn't seem to care about the additional information when presenting the output of the command.

This book also concentrates on using GNU and Open Source software for it's solutions. There is no mention of software that is not strictly Open Source. The only package information is for the Debian distribution by providing the apt name for retrieving the package. No other distribution is mentioned as having packages available. The author's reasoning is that Debian is the only "entirely committed to free software by design" distribution. URL's are provided only for packages that are not distributed by default with Debian, which might prove to be a nuisance for people using other distributions. I found myself trying some recipes, only to find my distribution didn't include that command by default.

Linux is a command-line operating system by default, and this book tries to work within those defaults by providing command-line methods rather than GUI methods. This gets around some of the various intricacies of the various distributions, but might prove confusing for the person who boots up the first time and can't find virtual console one because GDM is running. When appropriate, the book will defer to a GUI tool rather than a command-line tool. The GIMP is briefly discussed for several of the recipes, and GUI programs make up less than 10% of the answers to the recipe questions.

So, what's in it for me?:

It's tough for me to fully recommend this book to everyone. For the beginner, I recommend caution when starting off with this book. They may want to make this book their second book along with an installation and getting started tutorial. Beginners will find this book invaluable once they have a firm grasp on their distribution before being able to fully handle this book. For the seasoned Linux user, I recommend reading this book while putting your suppositions aside. There is plenty of good information to be had in these pages, and the author has tried painstakingly to make the answers in it as relevant to every Linux user as he can. The Linux Cookbook is a useful collection for those who don't mind getting comfortable with their shell prompt and a search engine.

There is also an electronic version of this book available at http://dsl.org/cookbook which is a living version of the printed book; for the sake of this review, only the printed book was reviewed.

You can purchase The Linux Cookbook from Fatbrain.

49 of 126 comments (clear)

  1. Iron Chef by FortKnox · · Score: 2, Funny

    'Allez Cuisine' was a nice touch, but you shoulda used more iron chef references in the article... ;-)

    --
    Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
  2. mmm roast penguin by bludstone · · Score: 5, Funny

    im sorry, but when i saw "the linux cookbook" along side the pictue of tux, i suddenly had a mental image of the spunky non-threatening linux mascot, baked in its own juices, with an apple in his mouth.. served up with a side of mashed potatos and gravy.

    mmm, linux. delicious.

    --

    no .sig
  3. nslookup and dig by bfree · · Score: 3, Informative

    Curiously if you install Debian testing/woody (the base has frozen) and try to run nslookup you will be told it is obsolete and that you should use dig. I like nslookup and understand it far better than dig so I do like they say and use the -sil option to get rid of the extra crud it spews to tell me this, but I guess there must be a reason for this so I'll have to learn how to dig properly, anyone know it?

    --

    Never underestimate the dark side of the Source

    1. Re:nslookup and dig by bfree · · Score: 3, Insightful

      Do you know why they added the message to nslookup? The message they added explains that you can disable the message (and hell this is Debian, so unless you put the non-free stuff into your sources.list you can be sure that you can get the source ot any apps to do what you want). I presume there is a real reason why Debian made this choice. To compare this however to MS is insane, MS would simply have stripped nslookup so you could not use it (unless you installed it from elsewhere) and told everyone how great the replacement is. Debian tell you that they think you should change, but it's up to you. To your more serious comments, I like nslookup too, but I can see ways to improve it (type "next" or something to get it to select one of the eligable next nameserves along the chain to the result you require). If 90% of the planet decides they want to hack on dig, that means dig is probably the way to go, but as they are both GPL you can pick up nslookup and maintain/fork it one it is not "so hard to maintain".

      --

      Never underestimate the dark side of the Source

    2. Re:nslookup and dig by Howie · · Score: 2, Informative

      dig's output is typically easier to deal with using awk or grep and the manpage for it says as much, but I don't know why you'd want to actively stop using nslookup (I use dig - I just prefer it).

      --
      "don't fall into the fallacy of believing that Perl can solve social problems. Maybe Perl 6 can, but that's a ways off"
    3. Re:nslookup and dig by bfree · · Score: 2

      Well on the grounds that Debian could choose to wipe out the message it is their choice, though I don't expect Debian to start too many forks with actions like that (that's not their place, they package not develop, save their packaging tools :-)

      --

      Never underestimate the dark side of the Source

    4. Re:nslookup and dig by bfree · · Score: 2

      OK, GPL was the wrong term to use (as it is false, Oooops), so how about I just say that it is in Debian (and not in non-US or non-free) and hence as a user you can have power over it. As for "freer" license, a question: After one distributional generation which is freer BSD or GPL?

      --

      Never underestimate the dark side of the Source

  4. nlslookup is depricated by quadcitytj · · Score: 2, Informative

    I think this might be the reason that nlslookup is not mentioned:

    [tj@pheonix tj]$ nslookup
    Note: nslookup is deprecated and may be removed from future releases.
    Consider using the `dig' or `host' programs instead. Run nslookup with
    the `-sil[ent]' option to prevent this message from appearing.
    > exit

    dig is much better, IMHO, once you get used to it.

    1. Re:nlslookup is depricated by Tet · · Score: 4, Informative
      dig is much better

      No, dig is an apalling tool. While it may well be far more powerful than nslookup, the interface it presents to the end user is awful. It highlights perfectly everything that is wrong with letting the average geek design a user interface. Remember, it's not just DNS administrators that want to do DNS queries. Plus, of course, not all the world uses BIND any more. Naturally, I firmly believe that I'm the exception -- a geek that can design a user interface for the rest of the world. Perhaps that's the problem, though, and we're all naïve (or is that arrogant?) enough to overestimate our abilities, and believe we can accurately guage (and allow for) the stupidity of the average end user. But for now, I'll continue living in my sheltered world, believing myself superior. I prefer it that way :-)

      --
      "The invisible and the non-existent look very much alike." -- Delos B. McKown
    2. Re:nlslookup is depricated by nagora · · Score: 2, Insightful

      Nslookup isn't exactly user-friendly either!

      --
      "Encyclopedia" is to "Wikipedia" what "Library" is to "Some people at a bus stop"
    3. Re:nlslookup is depricated by Tet · · Score: 2, Insightful
      Nslookup isn't exactly user-friendly either!

      Everything is relative. Compare the output of "nslookup slashdot.org" and "dig slashdot.org"...

      --
      "The invisible and the non-existent look very much alike." -- Delos B. McKown
    4. Re:nlslookup is depricated by A+Commentor · · Score: 2
      What they should do is have multiple hardlinks to the same executable...

      The program can check the value of 'argv[0]' and determine the format to display the output in. The old ZModem program used to do this to support the older protocols of YModem and XModem.. Thus depending on how it was called 'rz - zmodem, rb - ymodem, or rx - xmodem' the program would know what to default to.

      --

      Looking for any old 8-bit Heathkit/Zenith software/hardware - http://heathkit.garlanger.com

    5. Re:nlslookup is depricated by Tet · · Score: 2
      $ host www.slashdot.org
      www.slashdot.org CNAME slashdot.org
      slashdot.org A 64.28.67.150

      That still falls into the trap of assuming that people wanting to do DNS queries are:

      1. DNS administrators
      2. Using BIND syntax
      Fortunately, most Linux versions of host are compiled to provide more human readable output:
      isengard:~% host slashdot.org
      slashdot.org. has address 64.28.67.150
      --
      "The invisible and the non-existent look very much alike." -- Delos B. McKown
  5. Wonderful! by Tyler+Eaves · · Score: 2, Informative

    Spent the last few minutes browsing the online version, and I must say I'm quite impressed. Real usable docs for the average user, but they still tell the nuts and bolts too. Bravo!

    (User runs off to order)

    --
    TODO: Something witty here...
  6. oh please by Anonymous+Pancake · · Score: 3, Informative

    What linux user is going to buy a book when there is a free version available online? Probably the same amount of people who actually buy boxed versions of linux.

    And we just have to look at how the distro companies are doing to know the answer to that question.

    1. Re:oh please by dunstan · · Score: 2, Insightful

      Er, someone who wants to be able to look through a book rather than stare into a screen, to scribble in the margin, to read in the bath/loo. Or lend it to a friends, or leave it lying on the coffee table, or read it on the train.

      A lot of people will buy a boxed GNU/Linux distribution the first time, and then either download or use Cheapbytes from there on, but that's for something which needs to go on the computer anyway. A book, however, can be read away from the computer.

      Dunstan

      --
      The last scintilla of doubt just rode out of town
    2. Re:oh please by peeping_Thomist · · Score: 2
      What linux user is going to buy a book when there is a free version available online?


      I bought it a few months ago and have found it very useful. I can consult it when I'm away from a computer.

      --
      Anything worth doing is worth doing badly -- G.K. Chesterton
    3. Re:oh please by FortKnox · · Score: 4, Insightful

      Absolutely. Bruce Eckel is writing "Thinking In Patterns for Java" that is on his webpage, but the day it comes out in print, I'm buying a copy. Its just easier to read in book form, and easier to pick up for reference. Plus I want to put more money in his pocket, cause he writes the best coding books I've ever seen, and deserves the cash...

      --
      Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
    4. Re:oh please by pizen · · Score: 2

      "Books are great. They're portable, they're wireless, and they have their own search engine in the back."
      - Jim Greenlee, Georgia Tech CS professor on the benefits of the textbook.

    5. Re:oh please by Steveftoth · · Score: 2

      And also sometimes the internet takes a 'vacation.' At least mine does.

    6. Re:oh please by fanatic · · Score: 2

      What linux user is going to buy a book when there is a free version available online?

      Congressman. They like to bend their pages over.

      --
      "that's not encryption - it's a new perl script that I'm working on..." - from some Matrix parody
  7. Only Debian? Well yeah... by fobbman · · Score: 3, Interesting

    Quoted from the Introduction:

    "For the purposes of this book, I will assume that you are using the Debian GNU/Linux distribution, which, of all the major distributions, is the only one designed and assembled in the same manner that the Linux kernel and most other free software is written -- by individuals."

    He gave fair warning in the introduction. Maybe he should have called it The Debian Cookbook, but I think that by sticking with one fully free (speech) distro he's showing the true spirit of open-source software.

  8. Baked Slashdot by Bonker · · Score: 5, Funny

    Ingredients

    1 Cluster of Linux Webservers

    1 Instance of Slashcode

    1 DB of your choice

    3 Intelligent Posters

    38 Whiny karma-whores, who post frequently and then complain when their 'me too' style posts are modded down.

    493 Moderators who never follow the guidelines, even if they've ever bothered to read them.

    roughly 400,000 Trolls, flamers, evangelsits, ASCII artists, Katz-bashers, goat-sex linkers, Taco-haters, Microsoft-5uXX0r's and other assorted losers.

    Instructions:

    Combine listed ingredients in any given environment, heating with a steady stream of press releases from Apple, Microsoft, VA-Linux, the EFF, or the RIAA/MPAA. You can cull these press releases directly from CNet, Wired, Salon, ZDNet, or CNN if you don't have any. Once brought to a roiling boil, let bake under its own heat for as long as you can stand.

    Serve chilled, with white wine and flava beans. Serves 2

    --
    The next Slashdot story will be ready soon, but subscribers can beat the rush and slashdot the links early!
  9. More Free+Online Books by leastsquares · · Score: 5, Informative
    I have several freely available online books in my bookmarks. They are a great alternative to carrying huge tomes everywhere I go. I have three of the below books on real paper, but I use the online editions far more frequently:

    Numerical Recipies - Numerical Recipes in C, 2nd edition is the numerical methods book.

    Autobook - GNU Autoconf, Automake and Libtool.

    GGAD - GTK+/Gnome Application Development by Havoc Pennington. I'm not sure which is better, the book or the authors name!

    WGA - Writing GNOME Applications by John R. Sheets. Not complete, which is a pity. I'm sure that will change though.

    Docbook - The definitive guide to SGML.

    CVS book - Open Source Development with CVS by Karl Fogel. It is not quite the complete book, but it is the interesting bits.

    FreeBSD Handbook - FreeBSD documentation.

    Maximum RPM - Documentation for the RedHat package manager.

    Based on that list, can anybody suggest further online books that I may be interested in? (Don't bother telling me about the old O'Reilly books, I know about those)

    1. Re:More Free+Online Books by c_monster · · Score: 3, Interesting

      I can't help but make a shameless plug for my own free+online book about creating high-performance Web sites with Perl. Wait, I don't have to! My .sig will do it for me. :)

      ~chris

      --
      Read the full text my book Perl for the Web
    2. Re:More Free+Online Books by bcrowell · · Score: 4, Informative

      The Assayer is a site I run for user-submitted book reviews, with an emphasis on reviews of free books. Look here for a a database of free books, and here is a listing by subject. (The site includes some non-free books as well -- free ones have a bud or flower icon.)

    3. Re:More Free+Online Books by delphi125 · · Score: 2, Interesting

      Michael Abrash's Graphics Programming Black Book is nice and free: http://www.ddj.com/documents/s=865/ddj0165f/ Downloadable as a bunch of .pdf.gz files (1 per chapter)

  10. The recipie: by wiredog · · Score: 5, Funny
    • First, catch the penguin.
    • Pluck and clean the bird.
    • Cut up the bird.
    • Since penguins are tough, it will have to be marinated, I recommend overnight in a good strong red wine.
    • Place bird in pot with red wine to cover, some chopped onions, some garlic, the usual herbs.
    • Put pot in preheated 300 degree (Farenheit) oven. Cook for two hours.
    • Strain the sauce, thicken with a roux, spoon over bird bits.
    1. Re:The recipie: by Waffle+Iron · · Score: 4, Funny
      Here's an alternate Penguin recipie that I got from a Killer Whale I know:
      • First, catch the penguin.
      • Swallow it whole.
      • Repeat from from step 1 until sated.
  11. Re:Only Debian? Well yeah... by kigrwik · · Score: 3, Funny

    That's because Debian is the only distribution which freezes its releases.

    And it is widely known that geeks only 'cook' frozen meals: 3 minutes in the microwave, and eat with a plastic fork.

    --
    -- don't discount flying pigs until you have good air defense
  12. Another good CLI book... by Howie · · Score: 5, Informative

    Not linux specific (thankfully!), and pretty CLI-oriented, the Unix Power Tools book is something I found really good for learning the neat wrinkles in things like the shell, sed and awk. It's organised as lots of half-page articles which are densely cross-referenced, a little like the Effective C++ series by Scott Meyers or Effective Perl by Joeseph Hall. Published by O'Reilly - it's not an animal book though - it's much bigger. Good for dipping.

    --
    "don't fall into the fallacy of believing that Perl can solve social problems. Maybe Perl 6 can, but that's a ways off"
    1. Re:Another good CLI book... by booch · · Score: 2

      I agree whole-heartedlt that UNIX Power Tools is an excellent book. It's the only book that I have at work, and serves as an excellent reference to UNIX command-line arcana.

      However, it is geared toward a completely different audience. It is a reference manual for seasoned UNIX users, not Linux newbies.

      --
      Software sucks. Open Source sucks less.
  13. I have it and have found it very useful by Anonymous Coward · · Score: 4, Informative

    I own about a dozen Linux books now, but this is the best one for actually doing the basic things you need to do to get familiar with using Unix/Linux. I found the formulas for tarring and zipping and untarring and unzipping to be very nice. Just what I needed to know, nothing more, nothing less.

    I highly recommend this book to people who have been dual-booting Linux for awhile but are still having a hard time installing software and configuring the environment - stuff too simple for the guys who know what they are doing to even talk about.

  14. Corrected GGAD address by twilight30 · · Score: 3, Informative
    Should be here - you reversed the first two parts of the address by mistake.

    I think InformIT still do free online books -- they purchased Macmillan Press' old stuff and used to have many titles online.

    --
    ========================================
    Death will come, and will have your eyes
    -- Pavese
  15. For a good time... by cr@ckwhore · · Score: 2, Funny

    Cookbook for a good time:

    1. Edit /etc/inittab
    2. Change default runlevel to 6
    3. Reboot
    4. Reboot
    5. Reboot
    6. Reboot
    7. Reboot
    8. ...

    --
    Skiers and Riders -- http://www.snowjournal.com
  16. It's on andamooka, slash site for annotations by CatherineCornelius · · Score: 5, Interesting
    There is also an electronic version of this book available [here] which is a living version of the printed book

    Another site that carries it is the slashcoded Andamooka (with which I am not associated), which has the dual advantage of carrying many more open source books and permitting registered users to enter their own annotations on line.

  17. "Cookbook" as in "Perl Cookbook"? by Mozz+Alimoz · · Score: 2, Informative
    The Perl Cookbook published by O'Reilly was my most referenced book last year. Very common questions and all the right answers (there is often more than one right way.) I guess O'Reilly doesn't have rights to the "Cookbook" brand. No big deal, but I hope this book follows the same high standard.

    PS:The "Programming Perl" was my previous favourite reference book, but the online "perldoc" documentation replaces that now.

  18. Another Cooking Theme Author... by LeftHanded · · Score: 3, Informative

    A regular Linux Journal columnist, Marcel Gagné writes about system administration using a French Chef theme. He has written a book: Linux System Administration: A User's Guide. Look for it at Barnes and Noble

    --
    I think...I think it's in my basement. Let me go upstairs and check. -M.C. Escher (1898-1972)
  19. Numerical Recipes by KjetilK · · Score: 3, Informative

    Numerical Recipes in C, 2nd edition is the numerical methods book.

    I can't really agree with that.

    --
    Employee of Inrupt, Project Release Manager and Community Manager for Solid
    1. Re:Numerical Recipes by Erris · · Score: 2
      Ouch, that's harsh but then again the standards are set high. From the alternatives to NR page:

      It is naïve to hope that every computational problem can be solved by a simple procedure that can be described in a few pages of chatty prose, and using a page or two of Fortran or C code. Today's ambitions for correctness, accuracy, precision, stability, "robustness", efficiency, etc. demand sophisticated codes developed by experts with deep understanding of their disciplines. We have long ago outgrown the capabilities of the simplistic approaches of 30 years ago.

      Well! True. At the same time, it's not a bad place to start. Sometimes a chatty breeze is better for understanding than a phd level peer review trade journal. A fourth order Runge Kutta routine should not be your first ODE solver any more than an extrapolation routine should be used in production.

      By the way, the NR authors themselves recomend FORTRAN over C.

      --
      DMCA, Hollings, Palladium. What might have sounded like paranoia is now common sense.
    2. Re:Numerical Recipes by KjetilK · · Score: 2
      Hehe, well, I've been posting that link a few times lately here on /. Haven't seen it posted by anybody else, I learnt about this long ago on an R mailing list (I post that link too as often as I can).

      I think you correctly identify the strengths of NR, and if I do remember correctly (it's a long time since I read the whole anti-NR page), they give them some credit for it too.

      The main problem with NR is that as long as you understand the methods there fully, and realize their limitations, you're on safe grounds. Sometimes you can appreciate them fully from NR itself, and sometimes you can't, and a few of the methods are just flawed. So, you can use the stuff in NR when you fully understand it, but once you've reached that level, you've probably allready outgrown it... :-)

      --
      Employee of Inrupt, Project Release Manager and Community Manager for Solid
  20. Re:Only Debian? Well yeah... by fobbman · · Score: 3, Funny

    Microwaves are totally overkill. I left the top two 5¼ drive bays open on my Athlon system so I can slide my frozen dinner in there on a styrofoam tray. Cover the openings and I've got fully-cooked lasagna in about 15 minutes.

    Advanced Micro(wave) Devices, indeed.

  21. Re:More Free+Online Books - O'Reilly by zoward · · Score: 4, Informative

    For those who don't know about it: O'Reilly keeps a web page of free, open, and/or out-of-print books available online for your edification at http://www.reilly.com/openbook.

    --
    "Can't you see that everyone is buying station wagons?"
  22. Re:Only Debian? Well yeah... by abischof · · Score: 2

    You're not serious... are you? (Hmm.. Perhaps HHOK or HHOS could have been appended to your post)

    --

    Alex Bischoff
    HTML/CSS coder for hire

  23. use "host" by mattdm · · Score: 3, Informative

    99% of the time, I find that dig is overkill (and ugly), and instead I use the "host" program (also included with the bind-utils).

  24. Hey I know you by SilentReproach · · Score: 2, Funny

    >rm -f /bin/*

    I remember playing Quake CTF online and asked how to bind the grapple to a key. I think you must be the guy who advised me to type: "unbindall".

    --
    Religion is the opium of the people. Evolution is the opium of scientists.
  25. ease of use by jmkaza · · Score: 2, Insightful

    This cookbook demonstrates linux's most fundamental flaw. Seeing on slashdot that this book was both a great reference for users of any experience level and also freely downloadable, I proceeded to dsl.org to get a copy. After downloading, I was able to unzip and untar it, but now have a folder full of 167 files I have no idea what to do with. I presume there's something that needs to be compiled or some install package of sorts, but why all the extra effort. Why can't the linux community pick up on the fact that 'Click here to download Cookbook.pdf or Cookbook.sxg' is what's needed to create a user base capable of putting a dent in Microsoft's market share.

  26. dig vs. nslookup by macdaddy · · Score: 3, Informative
    Personally I still use nslookup. I simply haven't taken the time to learn dig or I'd probably use it. IIRC however, the later versions of Bind include a warning at each use that says:
    Note: nslookup is deprecated and may be removed from future releases. Consider using the `dig' or `host' programs instead. Run nslookup with the `-sil[ent]' option to prevent this message from appearing.
    That said teaching dig instead of nslookup was probably wise. Both should have been thaught though. For the record, I keep an old copy of nslookup in my ~/bin so I don't have to put up with the warning. Yes I know about -sil. It seems like I also ran into something that the new version wouldn't do that the old one would. I think....
  27. Re:Only Debian? Well yeah... by fobbman · · Score: 2

    And that, my friend, is the best part about the joke. Ya just...don't...know.

    I like leaving my leftover I brought for lunch out in the car until lunchtime during the summer (hold the mayo) so that it's nice and hot when I get to it. Unfortunately my insurance agent wouldn't let me reinsure my car as a household appliance.