dcsimg

Enterprise Unix Roundup: The Unix Bookshelf, 'Linux Server Hacks'

By Michael Hall (Send Email)
Posted Jan 2, 2004


When we last dusted off our Unix bookshelf, we were considering books about "the Unix Way" as an abstraction or paradigm, and hadn't gotten around to discussing any books addressing practical Unix. We'd planned to return with a few valuable "hands on" books that have gone down as classics (and we still will), but having had the good fortune of finding a relatively new book under the Christmas tree: "Linux Server Hacks," written by Rob Flickenger and published by O'Reilly, we decided to take a short detour. In addition to offering a potentially useful collection of quick solutions to assorted issues, the book provides an interesting entry point to a bit of Unix culture that the Linux revolution helped drive to greater notoriety: the virtue of laziness and the value of recycling knowledge. We review a new addition to our Unix bookshelf, 'Linux Server Hacks,' authored by Rob Flickenger and published by O'Reilly, and steer you toward fulfilling that New Years' resolution of getting more organized with remind, software that can be added to your .profile to provide a quick, 'at-a-glance' view of upcoming tasks.

Most technical types are already well familiar with O'Reilly's "animal books": pleasingly bound, single-topic texts with simple woodcuts of amusingly appropriate totem creatures on the cover. The company has established a high standard in practical technical publishing for its generally high level of quality and readability. It has earned a devoted following among everyone from computing novices drawn to its "Missing Manual" series to the stereotypical suspender-wearing Unix graybeard with a shelf full of more straightforward and dense books, unadorned titles like "DNS & BIND" or "sed & awk."

O'Reilly has successfully navigated the Linux-fueled revival of interest in classic Unix software and scripting languages by dusting off its older offerings and scoring a real coup with its Perl books, which are now part of the Web-driven zeitgeist of the '90s. Among the Perl books is the fairly useful "Perl Cookbook," a compendium of single-task code fragments that fully realized an important part of the hacker ethic: There's no shame in reusing useful work in the real world.

The "Perl Cookbook" harkens back to a classic of O'Reilly's Unix catalog: "Unix Power Tools," which offered an elephantine collection of quick shell scripts and one-offs that made Unix living easier. Currently in its third edition, the book definitely belongs on any Unix user's shelf. O'Reilly has followed up on the cookbook approach with PHP and Apache offerings. The books work because they acknowledge a large portion of the technical market: People who have learned a great deal on the job, aren't interested in knowing every detail of a particular piece of software or operating system, and need to know how to accomplish specific tasks.

The cookbook series has a spiritual cousin in O'Reilly's "hacks" series, a collection of thin volumes devoted to relatively narrow topics. Some of the books in the series are more end-user-focused than others, including "eBay Hacks," "Google Hacks," and "TiVo Hacks." At the more technical end of the spectrum, the series also includes "Spidering Hacks" and "Wireless Hacks."

If the word "hack" gets your hackles up because of its common use as a synonym for "security compromise," we hasten to point out that O'Reilly's use of the word is in keeping with an older and more benign usage that denotes inventive and inquisitive problem-solving. Among benign hackers, "hack" is often used in the same spirit as terms like "workaround," "kludge," or "jury rig," though it implies something more in the way of a clever or unconventional spirit.

"Linux Server Hacks" accomplishes its mission with mixed success. While O'Reilly has more thorough treatments of Linux in general with "Running Linux" and "Linux in a Nutshell," "Linux Server Hacks" seeks to solve specific problems, and it offers some useful and more broadly applicable information along the way. At the same time, some of the "hacks" are nothing more than straightforward applications of information one could find by reading a man page, or one of the innumerable tutorials available on sites like JustLinux.com (which, like ServerWatch, is a Jupitermedia site) or Linux.com.

To it's credit, we did notice that the section dealing with ssh offers one relatively clever hack to replicate much-missed behavior from ssh's precursor, rsh; however, it reiterated the man page for four of the "hacks."

Some of the hacks provided, such as those in the section on the use of hdparm to tune IDE performance, also seemed like they'd be common knowledge among most experienced Linux admins, but of more use to less-experienced users who approach their Linux system without a hard eye on performance tuning.

In other areas, though, the book is a fairly useful guide to some of the less-known alleys and byways of running a Linux server. For every hack that left us nodding impatiently and looking for something truly original, there seemed to be one that offered a different take on an old solution, or one that answered a question in such a way that we found ourselves jotting down notes on a to-do list of weekend projects we've never gotten around to tackling.

In the end, although some of the information the book provides is less hackish than plainly obvious and readily yielded by Google, most readers will probably find something useful or interesting between the covers. We therefore recommend "Linux Server Hacks" as a utility book with the following caveat: Its worth as a source of raw information will prove most dependent on the relative experience of the reader, and we encourage a quick skimming in the bookstore aisle to determine whether there's enough new information to warrant the purchase price.

As a gift for a Linux apprentice, though, we recommend "Linux Server Hacks" much more enthusiastically. Its tone and the wide range of topics encourage an exploratory spirit and a respect for lateral thinking not found in many technical books.

Security Roundup

It was a quiet week on the security front, but we did notice Mandrake offered a patch to ProFTPD that fixes a bug in patches dating back to September.

We also caught a newly discovered bug in Apache's mod_php that no vendor has yet addressed and which could lead to a malicious local user obtaining or changing "sensitive information." It's one worth keeping an eye on as folks return from the holidays next week.

Finally, updates continue to roll in on a BIND vulnerability that could lead to denial of service attacks, and on a fetchmail vulnerability first reported in October.

Tips of the Trade

New Years' resolutions for sysadmins always seem to involve better organization, so this week's tip is a pointer to a piece of software we like a lot for just that sort of resolution: the very useful remind. You can download remind from Roaring Penguin Software.

At its most simple, remind uses a simple flat text file called in the user's home directory and named ".reminders". Entries look like this:

REM 1 Apr MSG Remind CFO to Pay SCO License

When the command rem is run, any entries matching the day's date are printed on the screen, like so:

Reminders for Thursday, 1st April, 2004 (today):

Remind CFO to Pay SCO License

There are a lot of options for each entry in a .reminders file, but one you'll probably want to check out right away is the "delta" information you can add.

For example, taking our previous example and adding a "+3" to it, like so:

REM 1 Apr +3 MSG Remind CFO to Pay SCO License
will cause remind to print out the reminder starting three days in advance.

remind is a very useful addition to your .profile, providing a quick, "at-a-glance" of upcoming tasks when you first log in. It can also output calendars in HTML, postscript, or to the console. (Using the command rem -c+2, for example, prints a calendar for the next two weeks with all reminders listed.) Well worth a look for anyone who likes living in a shell and needs something more than a PostIt Note to keep track of upcoming events and appointments.

Page 1 of 1


Comment and Contribute

Your name/nickname

Your email

(Maximum characters: 1200). You have characters left.