STAT(5) — HP-UX
NAME
stat − data returned by stat/fstat/lstat system call
SYNOPSIS
#include <sys/types.h>
#include <sys/stat.h>
DESCRIPTION
The system calls stat, fstat, and lstat return data whose structure is defined by this include file. The encoding of the field st_mode is defined in this file also.
The contents of the stat structure include the following members:
dev_tst_dev; /* ID of device containing a */
/* directory entry for this file */
ino_tst_ino; /* Inode number */
ushortst_mode; /* File mode; see mknod(2) */
shortst_nlink; /* Number of links */
ushortst_uid; /* User ID of file owner */
ushortst_gid; /* Group ID of file group */
dev_tst_rdev; /* Device ID; this entry defined */
/* only for char or blk spec files */
off_tst_size; /* File size (bytes) */
time_tst_atime; /* Time of last access */
time_tst_mtime; /* Last modification time */
time_tst_ctime; /* Last file status change time */
/* measured in seconds since */
/* 00:00:00 GMT, Jan 1, 1970 */
The encoding of the field st_mode is defined as follows:
| #define | S_IFMT | 0170000 | /∗ type of file ∗/ |
| #define | S_IFDIR | 0040000 | /∗ directory ∗/ |
| #define | S_IFCHR | 0020000 | /∗ character special ∗/ |
| #define | S_IFBLK | 0060000 | /∗ block special ∗/ |
| #define | S_IFREG | 0100000 | /∗ regular (ordinary) ∗/ |
| #define | S_IFIFO | 0010000 | /∗ fifo ∗/ |
| #define | S_IFLNK | 0120000 | /∗ symbolic link ∗/ |
| #define | S_ISUID | 04000 | /∗ set user id on execution ∗/ |
| #define | S_ISGID | 02000 | /∗ set group id on execution ∗/ |
| #define | S_ISVTX | 01000 | /∗ save swapped text even after use ∗/ |
| #define | S_IREAD | 00400 | /∗ read permission, owner ∗/ |
| #define | S_IWRITE | 00200 | /∗ write permission, owner ∗/ |
| #define | S_IEXEC | 00100 | /∗ execute/search permission, owner ∗/ |
| #define | S_ENFMT | 02000 | /∗ set file-locking mode to enforced ∗/ |
NETWORKING FEATURES
RFA
The contents of the stat structure also include the following members:
uintst_remote:1; /* Set if file is remote */
dev_tst_netdev; /* ID of device containing */
/* network special file */
ino_tst_netino; /* Inode number of network special file */
The following additional bit is defined for the field st_mode:
| #define | S_IFNWK | 0110000 | /∗ network special ∗/ |
FILES
/usr/include/sys/stat.h
/usr/include/sys/types.h
SEE ALSO
DEPENDENCIES
Series 300 Diskless
The contents of the stat structure include the following additional members:
cnode_tst_cnode; /* Cnode ID of machine */
/* where the inode lives */
dev_tst_realdev; /* Real device number of device */
/* containing the inode for this file */
The following additional bit is defined for the field st_mode:
| #define | S_CDF | 04000 | /∗ context-dependent file ∗/ |
| /∗ if file type is directory ∗/ |
Hewlett-Packard Company — May 11, 2021