HP-UX Reference (11i v1 05/09) - 5 Miscellaneous Topics (vol 9)
s
stat(5) stat(5)
HP-UX EXTENSIONS
NAME
stat.h - file-specific information
DESCRIPTION
The contents of the stat structure include the following members:
ushort st_fstype; /*Type of filesystem this file */
/* is in; see vfsmount(2) */
dev_t#st_realdev; /* Real device number of device */
/* containing the inode for this file */
The following symbolic names for the values of the st_mode field are defined as indicated:
File type
S_IFMT 0170000 type of file
S_IFSOCK 0140000 socket
S_IFLNK 0120000 symbolic link
S_IFNWK 0110000 network special
S_IFREG 0100000 regular (ordinary)
S_IFBLK 0060000 block special
S_IFDIR 0040000 directory
S_IFCHR 0020000 character special
S_IFIFO 0010000 FIFO special (named pipe)
File mode bits: miscellaneous
S_CDF 0004000 directory is a context-dependent file
S_ISUID 0004000 set user id on execution
S_ISGID 0002000 set group id on execution
S_ENFMT 0002000 set file-locking mode to enforced
S_ISVTX 0001000 save swapped text even after use
File mode bits: permissions
S_IRWXU 0000700 owner’s file access permission bits
S_IRUSR 0000400 read access permission for owner
S_IWUSR 0000200 write access permission for owner
S_IXUSR 0000100 execute/search access permission for owner
S_IRWXG 0000070 group’s file access permission bits
S_IRGRP 0000040 read access permission for group
S_IWGRP 0000020 write access permission for group
S_IXGRP 0000010 execute/search access permission for group
S_IRWXO 0000007 others’ access permission bits
S_IROTH 0000004 read access permission for others
S_IWOTH 0000002 write access permission for others
S_IXOTH 0000001 execute/search access permission for others
File mode bits: obsolete permission names
S_IREAD 0000400 read access permission for owner
S_IWRITE 0000200 write access permission for owner
S_IEXEC 0000100 execute/search access permission for owner
File type test macros
S_ISCDF(m) test for a context-dependent file
S_ISNWK(m) test for a network special
S_ISSOCK(m) test for a socket
SEE ALSO
chmod(2), chown(2), link(2), mkdir(2), mknod(2), stat(2), symlink(2), umask(2), utime(2), mkfifo(3C),
types(5).
HP-UX 11i Version 1: September 2005 − 1 − Hewlett-Packard Company Section 5−−359