The UNIX Forums
"Join the Network of UNIX System Users"


 
Subject: sco unix inode structure.
arxidakas
Newbie
Rank: 1



UID 59
Digest Posts 0
Credits 0
Posts 42
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 20, 2007 10:31 AM  Profile | P.M. 
sco unix inode structure.



sco unix inode structure.



i have read quite a few threads here about the unix file creation date. i was interested in finding how to display it using a unix command. find did not help me so i looked at man inode. i found direction to htino.h which is described as the
structure of the inode for s51k (unix), htfs, eafs and afs. in this file i found

a structure dinode32 which contained the atime, mtime, ctime, and crtime with the crtime being the "/*time file was created*/".

does anyone know if this is being used by anyone and whether or not this is true for linux?


Top
CYBERAY
Newbie
Rank: 1



UID 102
Digest Posts 0
Credits 0
Posts 73
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 20, 2007 10:31 AM  Profile | P.M. 
struct stat from linux looks like


code:
struct stat {
    dev_t     st_dev;     /* id of device containing file */
    ino_t     st_ino;     /* inode number */
    mode_t    st_mode;    /* protection */
    nlink_t   st_nlink;   /* number of hard links */
    uid_t     st_uid;     /* user id of owner */
    gid_t     st_gid;     /* group id of owner */
    dev_t     st_rdev;    /* device id (if special file) */
    off_t     st_size;    /* total size, in bytes */
    blksize_t st_blksize; /* blocksize for filesystem i/o */
    blkcnt_t  st_blocks;  /* number of blocks allocated */
    time_t    st_atime;   /* time of last access */
    time_t    st_mtime;   /* time of last modification */
    time_t    st_ctime;   /* time of last status change */
};
Top
cosmokramer
Newbie
Rank: 1



UID 97
Digest Posts 0
Credits 0
Posts 37
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 20, 2007 10:31 AM  Profile | P.M. 
posix defines what stat can report - for any unix that claims to be posix-compliant.
file creation time is nor there. some file systems may support it. or not.

this whole thing is a big problem going from unix to unix - special features one box has that another does not. posix is an attempt to create syscall interface definitions that will work on any box that claims compliance. so it becomes possible to port code, for example.
Top
 

 

All times are GMT, the time now is Mar 21, 2010 12:03 AM

Powered by Discuz! 5.0.0  © 2001-2006 UNIX Forums
Processed in 0.005062 second(s), 8 queries

Clear Cookies - Contact Us - UNIX Help - Archiver - WAP