# stat - [Overview](#section61461440165637) - [Summary](#section273480706165637) - [Data Fields](#pub-attribs) - [Details](#section8458918165637) - [Field](#section896575698165637) - [st\_atime](#a69479adde11305b3952929a3788da6a4) - [st\_atime\_nsec](#a9ebc9f4f22737f17a8e85eaa192074d2) - [st\_blksize](#a637830d59004ce7b2bfbc684215cac5a) - [st\_blocks](#aa49bbffca4dfbe619ec4d25528db589c) - [st\_ctime](#adb96adc3e528fadacbc1f925d626a327) - [st\_ctime\_nsec](#a842e64ce0cb7833e4d6a4ca7ab9f2f4f) - [st\_dev](#a571c4887bc0064ba0f673eb19b61aa90) - [st\_gid](#a0a816257595eebd717ab8b9f7cb6e8d8) - [st\_ino](#a420fc2454334a400de3c5d55484b0b73) - [st\_mode](#a7278b9464298495a4c0d7a722598392a) - [st\_mtime](#a8e30df36b142416a21d280dcc5833fcc) - [st\_mtime\_nsec](#a5abfb8c4ff18fdbf3ecebe716976cf77) - [st\_nlink](#a7865ec265afbe7acf286d49c4a5be84b) - [st\_rdev](#aeda9f3b3d0caf6f087d5b3e7cc4c3ac3) - [st\_size](#ac5a52532e8a4feb60f82e60525ec8aa2) - [st\_uid](#a5d5f186135107ad27e7598919a40bdbd) ## **Overview** **Related Modules:** [FS](FS.md) **Description:** Defines the file information structure. ## **Summary** ## Data Fields

Variable Name

Description

st_dev

unsigned long

st_ino

unsigned long

st_mode

unsigned short

st_nlink

unsigned short

st_uid

unsigned short

st_gid

unsigned short

st_rdev

unsigned long

st_size

unsigned long

st_blksize

unsigned long

st_blocks

unsigned long

st_atime

unsigned long

st_atime_nsec

unsigned long

st_mtime

unsigned long

st_mtime_nsec

unsigned long

st_ctime

unsigned long

st_ctime_nsec

unsigned long

## **Details** ## **Field ** ## st\_atime ``` unsigned long stat::st_atime ``` **Description:** Time when the file is accessed for the last time which is represented by the number of seconds passed since 00:00:00 on January 1, 1970 ## st\_atime\_nsec ``` unsigned long stat::st_atime_nsec ``` **Description:** Time when the file is accessed for the last time, which is represented by the number of nanoseconds ## st\_blksize ``` unsigned long stat::st_blksize ``` **Description:** Size of the disk block that contains the file ## st\_blocks ``` unsigned long stat::st_blocks ``` **Description:** Number of disk blocks occupied by the file ## st\_ctime ``` unsigned long stat::st_ctime ``` **Description:** Time when the file state is modified for the last time, which is represented by the number of seconds ## st\_ctime\_nsec ``` unsigned long stat::st_ctime_nsec ``` **Description:** Time when the file state is modified for the last time, which is represented by the number of nanoseconds ## st\_dev ``` unsigned long stat::st_dev ``` **Description:** Device ID used by the file ## st\_gid ``` unsigned short stat::st_gid ``` **Description:** Group ID ## st\_ino ``` unsigned long stat::st_ino ``` **Description:** Inode number ## st\_mode ``` unsigned short stat::st_mode ``` **Description:** File mode, including **S\_IFDIR** \(Directory\), **S\_IFCHR** \(Character device\), **S\_IFBLK** \(Block device\), **S\_IFREG** \(Regular file\), **S\_IFIFO** \(FIFO\), **S\_IFLNK** \(Symbolic link\), and **S\_IFSOCK** \(Socket\) ## st\_mtime ``` unsigned long stat::st_mtime ``` **Description:** Time when the file is modified for the last time which is represented by the number of seconds passed since 00:00:00 on January 1, 1970 ## st\_mtime\_nsec ``` unsigned long stat::st_mtime_nsec ``` **Description:** Time when the file is modified for the last time, which is represented by the number of nanoseconds ## st\_nlink ``` unsigned short stat::st_nlink ``` **Description:** Number of hard links ## st\_rdev ``` unsigned long stat::st_rdev ``` **Description:** Device ID of the device file ## st\_size ``` unsigned long stat::st_size ``` **Description:** File size in bytes ## st\_uid ``` unsigned short stat::st_uid ``` **Description:** User ID of owner