fseek man page on SunOS

Man page or keyword search:  
man Server   20652 pages
apropos Keyword Search (all sections)
Output format
SunOS logo
[printable version]

FSEEK(3F)							     FSEEK(3F)

NAME
       fseek, fseeko64, ftell, ftello64 - reposition a file on a logical unit

SYNOPSIS
       integer*4 function fseek (lunit, offset, from)
	 integer*4 lunit
	 integer*4 offset
	    integer*8 offset in 64-bit environments
	 integer*4 from

       integer*4 function fseeko64 (lunit, offset, from)
	 integer*4 lunit
	 integer*8 offset
	 integer*4 from

       integer*4 function ftell (lunit)
	 integer*4 lunit

       integer*8 function ftello64 (lunit)
	 integer*4 lunit

DESCRIPTION
       lunit must refer to an open logical unit.  offset is an offset in bytes
       relative to the position specified by from.  Valid values for from are:
	    0 meaning 'beginning of the file'
	    1 meaning 'the current position'
	    2 meaning 'the end of the file'

       The value returned by fseek is 0 if successful,	a  system  error  code
       otherwise.  See perror(3F).

       The  function ftell returns the current position of the file associated
       with the specified logical unit.	 The value is  an  offset,  in	bytes,
       from  the beginning of the file.	 If the value returned is negative, it
       indicates an error and is the negation of the system error  code.   See
       perror(3F).

       The  offset  returned  by ftell can be used by fseek at a later time in
       the program to reposition the file to that same place for reading.

       CAUTION: On sequential files, following a call to fseek	by  an	output
       operation  (e.g. WRITE) causes all data records following the new posi‐
       tion to be deleted and replaced by the new data record (and an  end-of-
       file  mark).  Rewriting	a record in place can only be done with direct
       access files.

       fseeko64 and ftello64 operate identically to fseek  and	ftell  respec‐
       tively,	except	that  the  first  two  routines will operate on "large
       files" as well -- files with size in bytes greater than	the  range  of
       INTEGER*4  data	(2  Gb).  Large	 file  support was introduced with the
       Solaris 2.6 operating environment.

       When used with a large file, the variable  receiving  the  result  from
       ftello64 must also be declared INTEGER*8 to avoid truncation.

NOTES
       When  compiled to run in a 64-bit environment (with the compiler option
       -m64 the offset variable passed to fseek must be declared INTEGER*8.

       The  64-bit versions, fseeko64  and  ftello64,  are  provided  to  make
       portability between 32-bit and 64-bit environments easier.

FILES
       libfui.a

SEE ALSO
       fseek(3S), perror(3F),

				   10/02/02			     FSEEK(3F)
[top]

List of man pages available for SunOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net