


      SSSSTTTTAAAATTTT((((2222))))                     ((((UUUUNNNNIIIIXXXX 5555....0000))))                    SSSSTTTTAAAATTTT((((2222))))



      NNNNAAAAMMMMEEEE
           stat, fstat - get file status

      SSSSYYYYNNNNTTTTAAAAXXXX
           ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ttttyyyyppppeeeessss....hhhh>>>>
           ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ssssttttaaaatttt....hhhh>>>>

           iiiinnnntttt ssssttttaaaatttt ((((ppppaaaatttthhhh,,,, bbbbuuuuffff))))
           cccchhhhaaaarrrr ****ppppaaaatttthhhh;;;;
           ssssttttrrrruuuucccctttt ssssttttaaaatttt ****bbbbuuuuffff;;;;

           iiiinnnntttt ffffssssttttaaaatttt ((((ffffiiiillllddddeeeessss,,,, bbbbuuuuffff))))
           iiiinnnntttt ffffiiiillllddddeeeessss;;;;
           ssssttttrrrruuuucccctttt ssssttttaaaatttt ****bbbbuuuuffff;;;;

      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
           _P_a_t_h points to a path name naming a file.  Read, write or
           execute permission of the named file is not required, but
           all directories listed in the path name leading to the file
           must be searchable.  _S_t_a_t obtains information about the
           named file.

           Similarly, _f_s_t_a_t obtains information about an open file
           known by the file descriptor _f_i_l_d_e_s, obtained from a
           successful _o_p_e_n, _c_r_e_a_t, _d_u_p, or _f_c_n_t_l.  system call.

           _B_u_f is a pointer to a _s_t_a_t structure into which information
           is placed concerning the file.

           While the contents of the structure pointed to by _b_u_f
           include the following members, they are not necessarily in
           this order, nor are they necessarily the only entries:

                ushort  st_mode;    /* File mode; see _m_k_n_o_d(2) */
                ino_t   st_ino;     /* File id number/
                dev_t   st_dev;     /* ID of device containing */
                                    /* a directory entry for this file
                */
                dev_t   st_rdev;    /* ID of device */
                                    /* This entry is defined only for
                */
                                    /* character special or block
                special files */
                short   st_nlink;   /* Number of links */
                ushort  st_uid;     /* User ID of the file's owner */
                ushort  st_gid;     /* Group ID of the file's group */
                off_t   st_size;    /* File size in bytes */
                time_t  st_atime;   /* Time of last access */
                time_t  st_mtime;   /* Time of last data modification
                */
                time_t  st_ctime;   /* Time of last file status change
                */



      Page 1                                                   (9010-E)






      SSSSTTTTAAAATTTT((((2222))))                     ((((UUUUNNNNIIIIXXXX 5555....0000))))                    SSSSTTTTAAAATTTT((((2222))))



                                    /* Times measured in seconds since
                */
                                    /* 00:00:00 GMT, Jan. 1, 1970 */

           sssstttt____aaaattttiiiimmmmeeee  Time when file data was last accessed.  Changed by
                     the following system calls:  _c_r_e_a_t(2), _u_t_i_m_e(2),
                     and _r_e_a_d(2).

           sssstttt____mmmmttttiiiimmmmeeee  Time when data was last modified.  Changed by the
                     following system calls:  _c_r_e_a_t(2), _u_t_i_m_e(2), and
                     _w_r_i_t_e(2).

           sssstttt____ccccttttiiiimmmmeeee  Time when file status was last changed.  Changed
                     by the following system calls:  _c_h_m_o_d(2),
                     _c_h_o_w_n(2), _c_r_e_a_t(2), _l_i_n_k(2), _p_i_p_e(2), _u_n_l_i_n_k(2),
                     _u_t_i_m_e(2), and _w_r_i_t_e(2).

           _S_t_a_t will fail if one or more of the following are true:

                A component of the path prefix is not a directory.
                [ENOTDIR]

                The named file does not exist.  [ENOENT]

                Search permission is denied for a component of the path
                prefix.  [EACCES]

                _B_u_f or _p_a_t_h points to an invalid address.  [EFAULT]

           _F_s_t_a_t will fail if one or more of the following are true:

                _F_i_l_d_e_s is not a valid open file descriptor.  [EBADF]

                _B_u_f points to an invalid address.  [EFAULT]

      RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
           Upon successful completion a value of 0 is returned.
           Otherwise, a value of -1 is returned and _e_r_r_n_o is set to
           indicate the error.

      SSSSEEEEEEEE AAAALLLLSSSSOOOO
           chmod(2), chown(2), creat(2), link(2), time(2), unlink(2).













      Page 2                                                   (9010-E)



