File status information resides in the i-node. The stat subroutines are used to return information on a file. The stat subroutines report file type, file owner, access mode, file size, number of links, i-node number, and file access times. These subroutines write information into a data structure designated by the Buffer variable. The process must have search permission for the directories in the path to the designated file.
The statfs, fstafs, and ustat subroutines return status information about a file system.
fstatfs | Returns the information about the file system that contains the file associated with the given file descriptor. The structure of the returned information is described in the /usr/include/sys/statfs.h file for the statfs and fstatfs subroutines and in the ustat.h file for the ustat subroutine. |
statfs | Returns information about the file system that contains the file specified by the Path parameter. |
ustat | Returns information about a mounted file system designated by the Device variable. This device identifier is for any given file and can be determined by examining the st_dev field of the stat structure defined in the /usr/include/sys/stat.h file. The ustat subroutine is superseded by the statfs and fstatfs subroutines. |
utimes and utime | Also affect file status information. They change the file access and modification time in the i-node. |