Unix file creation time

Can anybvody tell me why unix doesn't keep file creation time? Is this such a big load for him, since it stores the modification time, the modification time and access time, but not the creation time? Is there any specific reason for this?

or through some language (any programming language) and some system calls can we get the file creation time in some way?

+3
source share
4 answers

I believe that such information is responsible for storing the inode and, therefore, for limiting the file system itself. A quick googling search, and it turns out that the ext4 file system added storage for this file attribute to its inode.

timestamps ext4

+5

, Unix , - , , .

, (, jpeg ) , , . , , (, inode).

, , (: EXIF).

- , :

  • UFS2/st_birthtime
  • ZFS/crtime
  • Ext4/crtime
  • btrfs/otime
  • HFS +/?

: , .

+2

WhiteboardDev, , , .

, . 70- , API. ( , " ", ...)

+1

stat st_ctime , dos/nt , , ,

, unix, , . ,

st_ctime      (.. , , , ..).

        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 file system I/O */
           blkcnt_t  st_blocks;  /* number of 512B 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 */
       };
+1

All Articles