read man page on Plan9

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

READ(2)								       READ(2)

       read, readn, write, pread, pwrite - read or write file

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

       long read(int fd, void *buf, long nbytes)

       long readn(int fd, void *buf, long nbytes)

       long write(int fd, void *buf, long nbytes)

       long pread(int fd, void *buf, long nbytes, vlong offset)

       long pwrite(int fd, void *buf, long nbytes, vlong offset)

       Read  reads nbytes bytes of data from the offset in the file associated
       with fd into memory at buf.  The offset is advanced by  the  number  of
       bytes  read.   It is not guaranteed that all nbytes bytes will be read;
       for example if the file refers to the console, at most one line will be
       returned.  In any event the number of bytes read is returned.  A return
       value of 0 is conventionally interpreted as end of file.

       Readn is just like read, but does successive read  calls	 until	nbytes
       have been read, or a read system call returns a non-positive count.

       Write  writes  nbytes bytes of data starting at buf to the file associ‐
       ated with fd at the file offset.	 The offset is advanced by the	number
       of  bytes  written.   The  number  of  characters  actually  written is
       returned.  It should be regarded as an error if this is not the same as

       Pread  and  Pwrite  are equivalent to a seek(2) to offset followed by a
       read or write.  By combining the operations in a	 single	 atomic	 call,
       they more closely match the 9P protocol (see intro(5)) and, more impor‐
       tant, permit multiprocess programs to execute multiple concurrent  read
       and write operations on the same file descriptor without interference.


       intro(2), dirread(2), dup(2), open(2), pipe(2), readv(2)

       These functions set errstr.

                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
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]
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