Linux Programming Bible

Author: John Goerzen
Publisher: IDG Books Worldwide
E-Mail: siteemail@idgbooks.com
Price: $39.99 US
ISBN: 0-764-54657-0
Reviewer: Ben Crowder
As anyone who has spent some time with Linux knows, our favorite operating system is a programmer's heaven. With dozens of free compilers and interpreters for practically every language in existence, source code available for most programs and the programmer-oriented philosophy behind the system, Linux can easily be described as a programmer's dream come true.
Sometimes, however, because there's so much out there, it's hard to keep track of everything, especially for a newbie. That's where the Linux Programming Bible comes in. In clear, concise writing, it shows both the forest and the trees of the exciting world of Linux programming. Note in advance that only a few topics are covered in deep detail; this book is more of a reference and tutorial for beginners, not a comprehensive mammoth of a book on one particular subject.
To start off the book, Chapter 1 introduces the Linux environment and how it relates to programming, including how to find documentation. The second chapter covers basic shell programming and is enough to get you started writing simple scripts which can serve as launchpads into more advanced shell programming. The third chapter, which could very well be one of the most important in the book, describes regular expressions in a fair amount of detail. It also explains how to use them in Perl, sed, awk and C/C++. Chapter 4 introduces the program that, in a sense, started the whole Open Source movement: Emacs. Finally, to conclude Part I, the fifth chapter covers the Linux file system layout, data files (such as /etc/passwd and /etc/group) and initialization scripts.
The second part of the book is devoted to the C/C++ environment. Chapter 6 gives an aerial view of gcc, with a few close fly-bys as well; it covers the different parts of the compiler, as well as some of the more commonly used options. The seventh chapter introduces a tool that has made many projects far easier to manage: GNU Make. It explains the basics of makefiles and goes through a handful of examples, which are enough to get you started. Chapter Eight covers memory management in Linux, statically and dynamically allocated memory, as well as some fun with those beloved pointers. The ninth chapter introduces both static and dynamic libraries and tools to help you manage the latter. When the inevitable bugs pop up, Chapter 10 is there to help you squash them—it explains how to use gdb, the GNU debugger.
Part III covers the Linux model, as the author describes it. The eleventh chapter explains the UNIX philosophy of “everything is a file”, and shows how to read and write from files. Chapter 12 introduces Linux processes: the basics, how to fork, synchronization and security-related items. Chapter 13 covers signals—handlers, sending/receiving and some dangers that programmers need to be aware of. Chapter 14 introduces the Linux I/O system, describing simple stream I/O, memory-mapped I/O, and select() and poll(). Chapter 15 closes Part III with an explanation of terminals and how to make sure your program acts nicely toward telnetters as well as toward those accessing it directly.
Nice programs talk with other programs, and that's what Part IV is about. Chapter 16 goes over shared memory and semaphores; Chapter 17 explains how to use pipes and FIFOs; and Chapter 18 introduces you to TCP/IP (Internet) sockets. Sockets are covered in more detail in Chapter 19.
Part V describes one of the most popular glue languages: Perl. Chapter 20 introduces the language, explaining the data structures and basic usage. Chapter 21 covers data manipulation—reading data, parsing and processing it, storing it and spitting it back out again. Perl has, in the eyes of many, been inseparably associated with CGI, and that's what Chapter 22 is about. Finally, Chapter 23 explains how to use Perl's database interface (DBI) to access SQL databases.
While command-line interfaces are quite useful and sufficient for many tasks, there are times when a graphical interface would be better suited. The sixth part of the book contains two chapters on the basics of X Windows from a programming viewpoint, Perl's (and Python's) graphical toolkit (Tk) and basic Gnome programming.
make made our lives easy. CVS made them even easier. The first chapter of Part VII explains the basics of CVS, including setting up your own repository, checking out and committing code, and branching/merging code. Chapter 27 describes some good security practices when writing code for Linux and Chapter 28 covers optimization. At the end of the book is a nice glossary that explains some of the more common terms used in the book.
Is it worth it? Unless you're a wizened kernel hacker with six or seven years of experience under your belt, the answer is yes. The book is a good overview of many topics, covers the most important subjects and can open your eyes to new, previously unseen horizons. This is a must-have book if you're interested in Linux programming.

Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.
Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.
Sponsored by ActiveState
| Non-Linux FOSS: libnotify, OS X Style | Jun 18, 2013 |
| Containers—Not Virtual Machines—Are the Future Cloud | Jun 17, 2013 |
| Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer | Jun 12, 2013 |
| Weechat, Irssi's Little Brother | Jun 11, 2013 |
| One Tail Just Isn't Enough | Jun 07, 2013 |
| Introduction to MapReduce with Hadoop on Linux | Jun 05, 2013 |
- Containers—Not Virtual Machines—Are the Future Cloud
- Non-Linux FOSS: libnotify, OS X Style
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- Linux Systems Administrator
- Validate an E-Mail Address with PHP, the Right Way
- Introduction to MapReduce with Hadoop on Linux
- RSS Feeds
- Weechat, Irssi's Little Brother
- New Products
- Tech Tip: Really Simple HTTP Server with Python
- Reply to comment | Linux Journal
2 min 14 sec ago - Didn't read
12 min 34 sec ago - Reply to comment | Linux Journal
17 min 34 sec ago - Poul-Henning Kamp: welcome to
2 hours 27 min ago - This has already been done
2 hours 28 min ago - Reply to comment | Linux Journal
3 hours 13 min ago - Welcome to 1998
4 hours 2 min ago - notifier shortcomings
4 hours 26 min ago - heroku?
6 hours 2 min ago - Android User
6 hours 4 min ago
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




Comments
THIS BOOK IS VERY GOOD
THIS BOOK IS VERY GOOD