Unix/Linux Go Back    

Unix Version 7 - man page for fseek (v7 section 3S)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

FSEEK(3S)										FSEEK(3S)

       fseek, ftell, rewind - reposition a stream

       #include <stdio.h>

       fseek(stream, offset, ptrname)
       FILE *stream;
       long offset;

       long ftell(stream)
       FILE *stream;


       Fseek  sets  the  position  of  the next input or output operation on the stream.  The new
       position is at the signed distance offset bytes from the beginning, the current	position,
       or the end of the file, according as ptrname has the value 0, 1, or 2.

       Fseek undoes any effects of ungetc(3).

       Ftell  returns the current value of the offset relative to the beginning of the file asso-
       ciated with the named stream.  It is measured in bytes on UNIX; on some other  systems  it
       is a magic cookie, and the only foolproof way to obtain an offset for fseek.

       Rewind(stream) is equivalent to fseek(stream, 0L, 0).

       lseek(2), fopen(3)

       Fseek returns -1 for improper seeks.

Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 09:09 PM.