


      WWWWRRRRIIIITTTTEEEE((((2222))))                    ((((UUUUNNNNIIIIXXXX 5555....0000))))                   WWWWRRRRIIIITTTTEEEE((((2222))))



      NNNNAAAAMMMMEEEE
           write - write on a file

      SSSSYYYYNNNNTTTTAAAAXXXX
           iiiinnnntttt wwwwrrrriiiitttteeee ((((ffffiiiillllddddeeeessss,,,, bbbbuuuuffff,,,, nnnnbbbbyyyytttteeee))))
           iiiinnnntttt ffffiiiillllddddeeeessss;;;;
           cccchhhhaaaarrrr ****bbbbuuuuffff;;;;
           uuuunnnnssssiiiiggggnnnneeeedddd nnnnbbbbyyyytttteeee;;;;

      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
           _F_i_l_d_e_s is a file descriptor obtained from a _c_r_e_a_t, _o_p_e_n,
           _d_u_p, or _f_c_n_t_l system call.  _W_r_i_t_e attempts to write _n_b_y_t_e
           bytes from the buffer pointed to by _b_u_f to the file
           associated with the _f_i_l_d_e_s.

           On devices capable of seeking, the actual writing of data
           proceeds from the position in the file indicated by the file
           pointer.  Upon return from _w_r_i_t_e, the file pointer is
           incremented by the number of bytes actually written.  On
           devices incapable of seeking, writing always takes place
           starting at the current position.  The value of a file
           pointer associated with such a device is undefined.

           If the O_APPEND flag of the file status flags is set, the
           file pointer will be set to the end of the file prior to
           each write.  _W_r_i_t_e fails and the file pointer remains
           unchanged if any of the following are true:

                _F_i_l_d_e_s is not a valid file descriptor open for writing.

                An attempt was made to write a file that exceeds the
                process's file size limit or the maximum file size.
                [EFBIG]

                _B_u_f points outside the process's allocated address
                space.  [EFAULT]

           If a _w_r_i_t_e requests that more bytes be written than there is
           room for only as many bytes as there is room for will be
           written.  For example, suppose there is space for 20 bytes
           more in a file before reaching a limit.  A write of 512
           bytes will return 20.  The next write of a non-zero number
           of bytes will give a failure return (except as noted below).

      RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
           Upon successful completion the number of bytes actually
           written is returned.  Otherwise, -1 is returned and _e_r_r_n_o is
           set to indicate the error.

      SSSSEEEEEEEE AAAALLLLSSSSOOOO
           creat(2), dup(2), lseek(2), open(2).




      Page 1                                                   (9010-E)






      WWWWRRRRIIIITTTTEEEE((((2222))))                    ((((UUUUNNNNIIIIXXXX 5555....0000))))                   WWWWRRRRIIIITTTTEEEE((((2222))))























































      Page 2                                                   (9010-E)






