GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
SEEK(3) FreeBSD Library Functions Manual SEEK(3)

seek - change file offset

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

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

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.

/src/lib9/seek.c

Sets errstr.

To avoid name conflicts with the underlying system, seek is a preprocessor macro defined as p9seek; see

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.