diff options
Diffstat (limited to 'man7/inode.7')
| -rw-r--r-- | man7/inode.7 | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/man7/inode.7 b/man7/inode.7 index 64d5435424..9e176b1610 100644 --- a/man7/inode.7 +++ b/man7/inode.7 @@ -37,7 +37,7 @@ structure, or which returns a .I statx structure. - +.PP The following is a list of the information typically found in, or associated with, the file inode, with the names of the corresponding structure fields returned by @@ -47,7 +47,7 @@ and .TP Device where inode resides \fIstat.st_dev\fP; \fIstatx.stx_dev_minor\fP and \fIstatx.stx_dev_major\fP - +.IP Each inode (as well as the associated file) resides in a filesystem that is hosted on a device. That device is identified by the combination of its major ID @@ -56,7 +56,7 @@ and minor ID (which identifies a specific instance in the general class). .TP Inode number \fIstat.st_ino\fP; \fIstatx.stx_ino\fP - +.IP Each file in a filesystem has a unique inode number. Inode numbers are guaranteed to be unique only within a filesystem (i.e., the same inode numbers may be used by different filesystems, @@ -65,12 +65,12 @@ This field contains the file's inode number. .TP File type and mode \fIstat.st_mode\fP; \fIstatx.stx_mode\fP - +.IP See the discussion of file type and mode, below. .TP Link count \fIstat.st_nlink\fP; \fIstatx.stx_nlink\fP - +.IP This field contains the number of hard links to the file. Additional links to an existing file are created using .BR link (2). @@ -78,7 +78,7 @@ Additional links to an existing file are created using User ID .I st_uid \fIstat.st_uid\fP; \fIstatx.stx_uid\fP - +.IP This field records the user ID of the owner of the file. For newly created files, the file user ID is the effective user ID of the creating process. @@ -87,7 +87,7 @@ The user ID of a file can be changed using .TP Group ID \fIstat.st_gid\fP; \fIstatx.stx_gid\fP - +.IP The inode records the ID of the group owner of the file. For newly created files, the file group ID is either the group ID of the parent directory or @@ -99,13 +99,13 @@ The group ID of a file can be changed using .TP Device represented by this inode \fIstat.st_rdev\fP; \fIstatx.stx_rdev_minor\fP and \fIstatx.stx_rdev_major\fP - +.IP If this file (inode) represents a device, then the inode records the major and minor ID of that device. .TP File size \fIstat.st_size\fP; \fIstatx.stx_size\fP - +.IP This field gives the size of the file (if it is a regular file or a symbolic link) in bytes. The size of a symbolic link is the length of the pathname @@ -113,20 +113,20 @@ it contains, without a terminating null byte. .TP Preferred block size for I/O \fIstat.st_blksize\fP; \fIstatx.stx_blksize\fP - +.IP This field gives the "preferred" blocksize for efficient filesystem I/O. (Writing to a file in smaller chunks may cause an inefficient read-modify-rewrite.) .TP Number of blocks allocated to the file \fIstat.st_blocks\fP; \fIstatx.stx_size\fP - +.IP This field indicates the number of blocks allocated to the file, 512-byte units, (This may be smaller than .IR st_size /512 when the file has holes.) - +.IP The POSIX.1 standard notes .\" Rationale for sys/stat.h in POSIX.1-2008 that the unit for the @@ -140,7 +140,7 @@ Furthermore, the unit may differ on a per-filesystem basis. .TP Last access timestamp (atime) \fIstat.st_atime\fP; \fIstatx.stx_atime\fP - +.IP This is the file's last access timestamp. It is changed by file accesses, for example, by .BR execve (2), @@ -153,7 +153,7 @@ and Other interfaces, such as .BR mmap (2), may or may not update the atime timestamp - +.IP Some filesystem types allow mounting in such a way that file and/or directory accesses do not cause an update of the atime timestamp. (See @@ -173,17 +173,17 @@ flag; see .TP File creation (birth) timestamp (btime) (not returned in the \fIstat\fP structure); \fIstatx.stx_btime\fP - +.IP The file's creation timestamp. This is set on file creation and not changed subsequently. - +.IP The btime timestamp was not historically present on UNIX systems and is not currently supported by most Linux filesystems. .\" FIXME Is it supported on ext4 and XFS? .TP Last modification timestamp (mtime) \fIstat.st_atime\fP; \fIstatx.stx_mtime\fP - +.IP This is the file's last modification timestamp. It is changed by file modifications, for example, by .BR mknod (2), @@ -201,7 +201,7 @@ changed for changes in owner, group, hard link count, or mode. .TP Last status change timestamp (ctime) \fIstat.st_ctime\fP; \fIstatx.stx_ctime\fP - +.IP This is the file's last status change timestamp. It is changed by writing or by setting inode information (i.e., owner, group, link count, mode, etc.). @@ -225,7 +225,7 @@ field (for the .I statx.stx_mode field) contains the file type and mode. - +.PP POSIX refers to the .I stat.st_mode bits corresponding to the mask @@ -254,7 +254,7 @@ S_IFIFO 0010000 FIFO .in .PP Thus, to test for a regular file (for example), one could write: - +.PP .nf .in +4n stat(pathname, &sb); @@ -293,7 +293,7 @@ socket? (Not in POSIX.1-1996.) .RE .PP The preceding code snippet could thus be rewritten as: - +.PP .nf .in +4n stat(pathname, &sb); @@ -319,7 +319,7 @@ and are provided if .BR _XOPEN_SOURCE is defined. - +.PP The definition of .BR S_IFSOCK can also be exposed either by defining @@ -328,7 +328,7 @@ with a value of 500 or greater or (since glibc 2.24) by defining both .BR _XOPEN_SOURCE and .BR _XOPEN_SOURCE_EXTENDED . - +.PP The definition of .BR S_ISSOCK () is exposed if any of the following feature test macros is defined: @@ -424,7 +424,7 @@ and so on. The .BR S_IF* constants are present in POSIX.1-2001 and later. - +.PP The .BR S_ISLNK () and |
