com (Haoyu Zhang) wrote:
Well, the purpose of the book is to teach you how to use them.
However, it assumes that you do know C fairly well. If you are
learning C, perhaps a more useful approach would be C first and
the UNIX environment second. I'm not familiar with what is
available for C books, but I'd start with "The C Programming
Languages" 2nd Ed. by K&R first, and go from there.
Stevens' book, however, is excellent for learning unix. It has
the added "advantage" of being a bit aged, which means it
doesn't mention Linux or anything else that came along in the
past dozen years. At first that will appear to be a major
disadvantage, but in fact you can turn it into a major plus.
All you have to do is debug the examples! Trust me, by the time
you get them to work you'll know a lot more than you would have
learned had they all been a match for a modern Linux box to
A little help is in order though. First, he uses some header
files that are included in all examples to allow the cruft to be
hidden away and not distract from the example. But the header
files need to be corrected. You *must* begin at the start of
the book and work your way through it one page at a time or it
is impossible to make sense of examples that are based on
As for the header files...
do a search on two words: linux apue.
I got 900 some hits, and in the first few were several that
offered downloadable source code for the examples. I'm sure
that several of them will have corrected header files to
allow the examples to compile on modern Linux systems.
Incidentally, your request is not at all absurd. Different
people learn in different ways. Your way of learning is quite
acceptable, assuming it works for you. I say that, because my
approach is much the same. As a result I spend a *lot* of time
leafing through books like Stevens' and doing web and Usenet
searches using google's advanced search pages.
Floyd L. Davidson <http://web.newsguy.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) com