stat.2: Cosmetic reworking of timestamp discussion in NOTES

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2013-10-25 15:42:26 +13:00
parent 96f92a7cb6
commit 1ef5b28054
1 changed files with 19 additions and 17 deletions

View File

@ -506,6 +506,21 @@ T}
A sticky command appeared in Version 32V AT&T UNIX.
.SH NOTES
On Linux,
.BR lstat ()
will generally not trigger automounter action, whereas
.BR stat ()
will (but see
.BR fstatat (2)).
For most files under the
.I /proc
directory,
.BR stat ()
does not return the file size in the
.I st_size
field; instead the field is returned with the value 0.
.SS Timestamp fields
Older kernels and older standards did not support nanosecond timestamp
fields.
Instead, there were three timestamp
@ -516,6 +531,7 @@ and
as
.IR time_t
that recorded timestamps with one-second precision.
Since kernel 2.5.48, the
.I stat
structure supports nanosecond resolution for the three file timestamp fields.
@ -537,27 +553,13 @@ is defined with the value 700 or greater.
If none of the aforementioned macros are defined,
then the nanosecond values are exposed with names of the form
.IR st_atimensec .
On filesystems that do not support subsecond timestamps,
the nanosecond fields are returned with the value 0.
Nanosecond timestamps are supported on XFS, JFS, Btrfs, and
ext4 (since Linux 2.6.23).
.\" commit ef7f38359ea8b3e9c7f2cae9a4d4935f55ca9e80
Nanosecond timestamps are not supported in ext2, ext3, and Resierfs.
On Linux,
.BR lstat ()
will generally not trigger automounter action, whereas
.BR stat ()
will (but see
.BR fstatat (2)).
For most files under the
.I /proc
directory,
.BR stat ()
does not return the file size in the
.I st_size
field; instead the field is returned with the value 0.
On filesystems that do not support subsecond timestamps,
the nanosecond fields are returned with the value 0.
.SS Underlying kernel interface
Over time, increases in the size of the
.I stat