Skip to Content
Advanced Programming in the UNIX® Environment: Second Edition
book

Advanced Programming in the UNIX® Environment: Second Edition

by W. Richard Stevens, Stephen A. Rago
June 2005
Intermediate to advanced
960 pages
23h 41m
English
Addison-Wesley Professional
Content preview from Advanced Programming in the UNIX® Environment: Second Edition

Chapter 3. File I/O

Introduction

We’ll start our discussion of the UNIX System by describing the functions available for file I/O—open a file, read a file, write a file, and so on. Most file I/O on a UNIX system can be performed using only five functions: open, read, write, lseek, and close. We then examine the effect of various buffer sizes on the read and write functions.

The functions described in this chapter are often referred to as unbuffered I/O, in contrast to the standard I/O routines, which we describe in Chapter 5. The term unbuffered means that each read or write invokes a system call in the kernel. These unbuffered I/O functions are not part of ISO C, but are part of POSIX.1 and the Single UNIX Specification.

Whenever we describe the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Advanced Programming in the UNIX® Environment, Third Edition

Advanced Programming in the UNIX® Environment, Third Edition

W. Richard Stevens, Stephen A. Rago
What Employees Want Most in Uncertain Times

What Employees Want Most in Uncertain Times

Kristine W. Powers, Jessica B.B. Diaz

Publisher Resources

ISBN: 0201433079Purchase book