Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ stat(F) — OpenDesktop 1.0.0y

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

stat(S)


     STAT(F)                                    UNIX System V



     Name
          stat - data returned by stat system call


     Syntax
          #include <sys/stat.h>


     Description
          The sys/stat.h include file contains the definition for  the
          structure  returned  by  the  stat and fstat functions.  The
          structure is defined as:

          struct stat{
            dev_t        st_dev;     /*


            ino_t        st_ino;     /* inode number */
            ushort       sh_mode;    /* file mode */
            short        st_nlink;   /* # of links */
            ushort       st_uid;     /* owner uid */
            ushort       st_gid;     /* owner gid */
            dev_t        st_rdev;    /*


            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' */
          };

          Note that the st_atime, st_mtime, and  st_ctime  values  are
          measured in seconds since 00:00:00 (GMT) on January 1, 1970.

          The st_mode value is actually a combination of one  or  more
          of the following file mode values:


          S_IFMT     0170000   /* type of file */
          S_IFDIR    0040000   /* directory */
          S_IFCHR    0020000   /* character special */
          S_IFBLK    0060000   /* block special */
          S_IFREG    0100000   /* regular */
          S_IFIFO    0010000   /* fifo */
          S_IFNAM    0050000   /* name special entry */
          S_INSEM    01        /* semaphore */
          S_INSHD    02        /* shared memory */
          S_ISUID    04000     /* set user id on execution */
          S_ISGID    02000     /* set group id on execution */
          S_ISVTX    01000     /* save swapped text even after use */
          S_IREAD    00400     /* read permission, owner */
          S_IWRITE   00200     /* write permission, owner */
          S_IEXEC    00100     /* execute/search permission, owner */


     Files
          /usr/include/sys/stat.h


     See Also
          stat(S)


     Standards Conformance
          stat is conformant with:

          AT&T SVID Issue 2, Select Code 307-127;
          The X/Open Portability Guide II of January 1987;
          IEEE  POSIX  Std  1003.1-1988  with  C  Standard   Language-
          Dependent System Support;
          and NIST FIPS 151-1.


     (printed 8/23/89)                                  STAT(F)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026