[fl]seek mechanism

charles spell cs00chs at unccvax.UUCP
Sat Sep 2 02:54:57 AEST 1989


Does the kernal optimize seeks within an open file?

Eg.
if you have a file descriptor that is currently at offset 500,000 of a
1,000,000 byte file, which would be faster (to get to byte 500,001)?:

lseek(fd, 1L, 1);             -OR-               lseek(fd, 500001L, 0);

with file descriptors:
fseek(fp, 1L, 1);             -OR-               fseek(fp, 500001L, 0);

_____________________________________________________________________________
Clemson IPTAY: It's Probation Time Again Y'all....



More information about the Comp.unix.questions mailing list