Generic Usenet Account
2007-12-29 00:21:52 UTC
Hi,
As per my man pages, the stat structure contains the following fields:
struct stat {
dev_t st_dev; /* device */
ino_t st_ino; /* inode */
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 type (if inode
device) */
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 change */
};
I am interested in the file creation time. What field should I use?
Should I go with some other system call? Also, what is the difference
between the time of last modification and the time of last change?
Thanks,
Gus
As per my man pages, the stat structure contains the following fields:
struct stat {
dev_t st_dev; /* device */
ino_t st_ino; /* inode */
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 type (if inode
device) */
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 change */
};
I am interested in the file creation time. What field should I use?
Should I go with some other system call? Also, what is the difference
between the time of last modification and the time of last change?
Thanks,
Gus