SEEK man page on Plan9

Printed from http://www.polarhome.com/service/man/?qf=SEEK&af=0&tf=2&of=Plan9

SEEK(2)								       SEEK(2)

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
       /sys/src/libc/9syscall

SEE ALSO
       intro(2), open(2)

DIAGNOSTICS
       Sets errstr.

								       SEEK(2)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Plan9

List of man pages available for Plan9

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