Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ inode(5) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fs

stat.h

types.h

inode

Purpose

     Describes a  file system  file or  directory entry  as it
     appears on a disk.

Synopsis

     #include <sys/types.h>
     #include <sys/ino.h>

Description

     An  inode for  an ordinary  file or  directory in  a file
     system has the following structure defined by sys/ino.h:

            /* Inode structure as it appears on a disk block. */
           struct dinode
           {
                 ushort  di_mode;    /* mode and type of file */
                 short  di_nlink;    /* number of links to file */
                 ushort  di_uid;     /* owner's user id */
                 ushort  di_gid;     /* owner's group id */
                 off_t  di_size;     /* number of bytes in file */
                 char   di_addr[40]; /* disk block addresses */
                 time_t  di_atime;   /* time last accessed */
                 time_t  di_mtime;   /* time last modified */
                 time_t  di_ctime;   /* time created */
            };
            /*
            *the 40 address bytes:
            *   39 used; 13 addresses
            *   of 3 bytes each.
            */

     The fields in the structure are as follows:

     addr       Array   of  thirteen   3-byte  block   numbers
                assigned  to this  file.  The  first 10  block
                numbers are direct addresses  while the last 3
                are indirect addresses.

     atime      Time this file was last accessed.

     ctime      Time this file was created.

     gid        Group ID.

     mode       Type and access permissions of file.

     mtime      Time this file was last modified.

     nlink      Number of directories that name this file.

     size       Number of bytes in file.

     uid        Owner ID.

     See the types file for related information concerning the
     off_t and time_t define types.

Related Information

     In this book:  "fs,"  "stat.h," and  "types.h."

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