Linux Programming by Example
Appropriate for all entry-level Linux and Unix programming courses.
This book teaches Linux programming in one of the most effective ways possible: by showing and explaining well-written programs. Arnold Robbins focuses on the fundamental Linux system call APIs that form the core of any significant program, and presents code from production programs that Linux and Unix users already work with every day, ranging from Unix source code to GNU utilities such as ls and cp. The topics and APIs covered include: memory management; file I/O, file meta-information, processes, users and groups, sorting, argument parsing, extended interfaces, internationalization, debugging, and more. Robbins stresses fundamental programming principles, and often presents both higher-level and lower-level approaches to key tasks, helping students understand how things work “under the hood.” He also demonstrates how to address the real-world issues that arise in writing software—notably performance, portability, and robustness. All code examples are downloadable from a companion Web site, and most apply equally well to both Linux and Unix. Where differences exist, the author notes them. Linux Programming by Example: The Fundamentals is intended for students who already understand the basics of C and/or C++
Table of Contents:
2. Arguments, Options, and the Environment
3. User-Level Memory Management
4. Files and File I/O.
5. Directories and File Metadata.
6. General Library Interfaces - Part 1
7. Putting It All Together: ls.
8. Filesystems and Directory Walks.
9. Process Management and Pipes.
11. User and Group ID Numbers and Permissions.
12. General Library Interfaces - Part 2.
13. Internationalization and Localization.
14. Extended Interfaces.
16. Tying It Together - A Project.
Appendix A. Teach Yourself Programming in Ten Years.
Appendix B. Caldera Ancient UNIX License.
Appendix C. GNU General Public License.
Terms and Conditions for Copying, Distribution and Modification.
How to Apply These Terms to Your New Programs.