// PROTOTYPE off_t lseek(int fd, off_t offset, int whence)
Seek to a position in a file. Affects where the next read or write will occur. Seeking past the end of the file does not immediately increase the size of the file, but will do so after the next write.
fd: The file descriptor for the file, return from the
offset: Offset. The usage depends on
SEEK_SETthe offset must be >= 0. For
SEEK_CURit can be positive or negative to seek relative to the current position. Negative values used with
SEEK_ENDmove relative to the end-of-file.
SEEK_SET: Seek to
offsetbytes from the beginning of the file.
SEEK_CUR: Seek relative to the current file position.
SEEK_END: Seek relative to the end of the file.
offsetof 0 means seek to the end of the file when using