Advanced Programming in the
UNIX Environment

by W. Richard Stevens
Addison-Wesley Professional Computing Series
0-201-56317-7 * Hardcover * 768 pages * ©1992
[Buy this book]

Chapter 3. File I/O

Introduction * File Descriptors * open Function * creat Function * close Function * lseek Function * read Function * write Function * I/O Efficiency * File Sharing * Atomic Operations * dup and dup2 Functions * fcntl Function * ioctl Function * /dev/fd * Summary

Example Relevant Functions
3.1 Test if stdin is seek'able lseek
3.2 Create a file with a hole in it creat, write, lseek (past EOF)
3.3 Copy standard input to standard output (unbuffered) read, write
3.4 Print file satus flags on specified descriptor fcntl (with F_GETFL)
3.5 set_fl: Turn file status flags on: fcntl (with F_SETFL)

[Buy this book]