HPUX stat[5]

stat in anderen Kapiteln des hpux Handbuch:
stat.3f
stat.2
stat(5) stat(5)
NAME
stat.h - file-specific information
SYNOPSIS
#include <sys/stat.h>
DESCRIPTION
The <sys/stat.h> header defines the structure of the data returned by
the functions stat(), fstat(), and lstat().
The contents of the stat structure include the following members:
dev_t st_dev; /* ID of device containing a */
/* directory entry for this file */
ino_t st_ino; /* Inode number */
ushort st_fstype; /* Type of filesystem this file */
/* is in; see vfsmount(2)*/
ushort st_mode; /* File mode; see mknod(2)*/
short st_nlink; /* Number of links */
uid_t st_uid; /* User ID of file owner */
gid_t st_gid; /* Group ID of file group */
dev_t st_rdev; /* Device ID; this entry defined */
/* only for char or blk spec files */
cnode_t st_cnode; /* Cnode ID of machine */
/* where the inode lives */
dev_t st_realdev; /* Real device number of device */
/* containing the inode for this file */
off_t st_size; /* File size (bytes) */
time_t st_atime; /* Time of last access */
time_t st_mtime; /* Last modification time */
time_t st_ctime; /* Last file status change time */
/* measured in seconds since */
/* 00:00:00 UTC, Jan 1, 1970 */
The following symbolic names for the values of the st_mode field are
defined as indicated:
File type:
l1p-1 l1 l. 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:
File miscellaneous mode bits:
Hewlett-Packard Company - 1 - HP-UX Release 9.0: August 1992
stat(5) stat(5)
l1p-1 l1 l. 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 permission mode bits:
l1p-1 l1 l. 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
Obsolete names for file permission mode bits:
l1p-1 l1 l. 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:
l1p-1 l. S_ISBLK(m) test for a block special file
S_ISCDF(m) test for a context-dependent file
S_ISCHR(m) test for a character special file
S_ISDIR(m) test for a directory S_ISFIFO(m) test for
a FIFO special file S_ISLNK(m) test for a symbolic link
S_ISNWK(m) test for a network special
S_ISREG(m) test for a regular file S_ISSOCK(m) test
for a socket
SEE ALSO
chmod(2), chown(2), link(2), mkdir(2), mkfifo(2), mknod(2), stat(2),
symlink(2), umask(2), utime(2), types(5).
STANDARDS CONFORMANCE
<sys/stat.h>: AES, SVID2, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1
Hewlett-Packard Company - 2 - HP-UX Release 9.0: August 1992