CSCI-E28 Lecture 2 Outline _________________________________________________________________ Topics: Files, System Files, the Manual, Buffering Approach: Write our own versions of Unix programs Featured Commands: who cp tail Main Ideas: i/o redirection, pipes standard directories/files the manual tells all open, read, write, close unix time `expensive' operations buffered input/output Applications: who0 : writing a system utility the manual, the header files who1 : reading and displaying data the utmp file open(), read() who2 : displaying dates and times localtime(), strftime() cp : writing data, creating files creat(), open() write() effect of buffer size: efficiency, system calls, buffering who3 : making who more efficient more buffering kernel buffering speedier disk access tail lseek() what it does how it does it