Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
SEEK(3)			   Library Functions Manual		       SEEK(3)

NAME
       seek - change file offset

SYNOPSIS
       #include	<u.h>
       #include	<libc.h>

       vlong seek(int fd, vlong	n, int type)

DESCRIPTION
       Seek sets the offset for	the file associated with fd as follows:

	      If type is 0, the	offset is set to n bytes.

	      If type is 1, the	pointer	is set to its current location plus n.

	      If type is 2, the	pointer	is set to the size of the file plus n.

       The new file offset value is returned.

       Seeking in a directory is not allowed.  Seeking in a pipe is a no-op.

SOURCE
       /usr/local/plan9/src/lib9/seek.c

SEE ALSO
       intro(3), open(3)

DIAGNOSTICS
       Sets errstr.

BUGS
       To  avoid  name	conflicts  with	 the underlying	system,	seek is	a pre-
       processor macro defined as p9seek; see intro(3).

								       SEEK(3)

NAME | SYNOPSIS | DESCRIPTION | SOURCE | SEE ALSO | DIAGNOSTICS | BUGS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=seek&sektion=3&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help