~ubuntu-branches/ubuntu/saucy/manpages/saucy

« back to all changes in this revision

Viewing changes to man2/stat.2

  • Committer: Bazaar Package Importer
  • Author(s): Benjamin Drung
  • Date: 2010-11-17 16:35:58 UTC
  • mfrom: (1.1.45 upstream) (2.2.8 sid)
  • Revision ID: james.westby@ubuntu.com-20101117163558-9h3ho5jumqm3rdmd
Tags: 3.27-1ubuntu1
* Merge from Debian unstable; remaining changes:
  - ptrace.2, prctl.2: document Ubuntu-specific PTRACE_ATTACH,
    PR_SET_PTRACER behavior.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
.\" 2007-06-08 mtk: Added example program
38
38
.\" 2007-07-05 mtk: Added details on underlying system call interfaces
39
39
.\"
40
 
.TH STAT 2 2009-09-30 "Linux" "Linux Programmer's Manual"
 
40
.TH STAT 2 2010-09-20 "Linux" "Linux Programmer's Manual"
41
41
.SH NAME
42
42
stat, fstat, lstat \- get file status
43
43
.SH SYNOPSIS
57
57
Feature Test Macro Requirements for glibc (see
58
58
.BR feature_test_macros (7)):
59
59
.in
 
60
.ad l
 
61
.PD 0
60
62
.sp
61
63
.BR lstat ():
62
 
_BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500
 
64
.RS 4
 
65
.TP 4
 
66
Since glibc 2.10
 
67
_POSIX_C_SOURCE\ >=\ 200112L ||
 
68
_BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
 
69
_XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
 
70
.TP 4
 
71
Before glibc 2.10
 
72
_BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
 
73
_XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
 
74
.RE
 
75
.PD
 
76
.ad
63
77
.SH DESCRIPTION
64
78
.PP
65
79
These functions return information about a file.
443
457
.SH NOTES
444
458
Since kernel 2.5.48, the
445
459
.I stat
446
 
structure supports nanosecond resolution for the three
447
 
file timestamp fields.
448
 
Glibc exposes the nanosecond component of each field using names either
449
 
of the form
450
 
.IR st_atim.tv_nsec ,
 
460
structure supports nanosecond resolution for the three file timestamp fields.
 
461
Glibc exposes the nanosecond component of each field using names of the form
 
462
.IR st_atim.tv_nsec
451
463
if the
452
464
.B _BSD_SOURCE
453
465
or
454
466
.B _SVID_SOURCE
455
 
feature test macro is defined,
456
 
or of the form
457
 
.IR st_atimensec ,
458
 
if neither of these macros is defined.
 
467
feature test macro is defined.
 
468
These fields are specified in POSIX.1-2008, and, starting with version 2.12,
 
469
glibc also exposes these field names if
 
470
.BR _POSIX_C_SOURCE
 
471
is defined with the value 200809L or greater, or
 
472
.BR _XOPEN_SOURCE
 
473
is defined with the value 700 or greater.
 
474
If none of the aforementioned macros are defined,
 
475
then the nanosecond values are exposed with names of the form
 
476
.IR st_atimensec .
459
477
On file systems that do not support subsecond timestamps,
460
 
these nanosecond fields are returned with the value 0.
 
478
the nanosecond fields are returned with the value 0.
461
479
.\" As at kernel 2.6.25, XFS and JFS support nanosecond timestamps,
462
480
.\" but ext2, ext3, and Reiserfs do not.
463
 
.\" FIXME . SUSv4 specifies nanosecond timestamps.
464
481
 
465
482
On Linux,
466
483
.BR lstat ()
602
619
.BR capabilities (7),
603
620
.BR symlink (7)
604
621
.SH COLOPHON
605
 
This page is part of release 3.26 of the Linux
 
622
This page is part of release 3.27 of the Linux
606
623
.I man-pages
607
624
project.
608
625
A description of the project,