size_t lseek(int fd, int64_t offset, int whence);
Changes the file position of the file handle fd. The whence argument can be SEEK_SET, SEEK_CUR, or SEEK_END. Returns the new location relative to the start of the file.
ftruncate, truncate