seek
seek(fid, offset[, origin])
This function sets the position of the next input or output operation on the file identified by fid, which must be a return value from a previous call to open.
The new position is given by offset, which is the signed distance offset bytes from the beginning, the current position, or the end of the file, according to the value of origin which must be 0, 1, or 2. If origin is omitted, 0 is used.
seek returns 0 on success or -1 on failure, for example, if an attempt is made to seek on a file ID associated with a non-seekable device.
seek(fid, 0) rewinds the file associated with fid.