This is a book about UNIX programming. It starts with basic concepts and ends with
coverage of advanced topics. It is a self-teaching guide, and yet it functions as a
UNIX reference book.
The examples provided are written in the C and C++ languages. The examples are
short programs, each intended to demonstrate use of a particular programming facility.
The C++ programs are written as simple programs and should be well understood by
those that do not program in C++.
This book attempts to be UNIX platform neutral. Throughout the book, differences in
functionality are noted for your convenience. This will save you time when you must
write projects that must be UNIX portable.
FreeBSD 3.4 release is used throughout this book for demonstration purposes. This
guarantees that the example programs will compile and run without any additional
effort on that platform. This also grants a specific level of functionality, since some
functions are lacking or vary on other platforms. You can obtain FreeBSD from the
Internet or purchase it on a CD-ROM at a nominal cost. This allows you to work
through the book on a platform that is on a par with other professional UNIX
The Structure of This Book
This section outlines the general structure of the book and describes what each chapter
Chapter 1: Compiler Notes and Options
Chapter 1 begins with basic coverage of the man(1) command and provides
references to Internet resources for manual pages of other UNIX platforms. An
introduction to compiling under FreeBSD is included, with a review of standard
compile options for all UNIX platforms. The remainder of the chapter provides
helpful hints on how to manage compiler warnings effectively.
Chapter 2: UNIX File System Objects
This chapter reviews the various UNIX file system object types. Some discussion of
the unique characteristics of each is provided, primarily for the beginner's benefit. The
chapter continues with a review of the role that access permissions play with eac