Go to the first, previous, next, last section, table of contents.
Syntax
#include <unistd.h>
off_t lseek(int fd, off_t offset, int whence);
Description
This function moves the file pointer for fd according to
mode:
SEEK_SET
-
The file pointer is moved to the offset specified.
SEEK_CUR
-
The file pointer is moved relative to its current position.
SEEK_END
-
The file pointer is moved to a position offset bytes from the end
of the file. The offset is usually nonpositive in this case.
Return Value
The new offset is returned.
Portability
not ANSI, POSIX
Example
lseek(fd, 12, SEEK_CUR); /* skip 12 bytes */
Go to the first, previous, next, last section, table of contents.