Knowledge

stat (system call)

Source 📝

22: 738: 1088: 942:
system calls are executed, or before the file's in-memory inode is evicted from the filesystem cache. Additionally, it is possible to configure for how long atime modifications can remain unflushed. That way, lazytime retains POSIX compatibility while offering performance improvements.
842:("relative atime", introduced in 2.6.20 and the default as of 2.6.30) – only update atime under certain circumstances: if the previous atime is older than the mtime or ctime, or the previous atime is over 24 hours in the past 938:. It allows POSIX-style atime updates to be performed in-memory and flushed to disk together with some non-time-related I/O operations on the same file; atime updates are also flushed to disk when some of the 955:
originally meant creation time; however, while early Unix did have modification and creation times, the latter was changed to be access time before there was any C structure in which to call anything
1066:
In Linux kernels 2.5.48 and above, the stat structure supports nanosecond resolution for the three file timestamp fields. These are exposed as additional fields in the stat structure.
785:
which has been criticized as it is inconsistent with a read only file system. File system cache may significantly reduce this activity to one disk write per cache flush.
806:
mount option offers sufficient performance for most purposes and should not break any significant applications, as it has been extensively discussed. Initially,
810:
only updated atime if atime < mtime or atime < ctime; that was subsequently modified to update atimes that were 24 hours old or older, so that
2269:
Upon successful completion, where nbyte is greater than 0, write() shall mark for update the last data modification and last file status change timestamps
1001:
is affected by renaming a file, despite filenames not being stored in inodes: Both original Unix, which implemented a renaming by making a link (updating
1073:
is 10 milliseconds, while resolution of its write time is two seconds, and access time has a resolution of one day thus it acts as the access date.
554:, since this structure provides a higher resolution time unit. For the sake of compatibility, implementations can define the old names in terms of the 225:
structure, which represents file sizes with a 64-bit type, allowing the functions to work on files 2 GiB and larger (up to 8 EiB). When the
1063:
Some filesystems provide finer granularity. Solaris 2.1 introduced a microsecond resolution with UFS in 1992 and a nanosecond resolution with ZFS.
2428: 909: 748: 163:
buffer argument, which is used to return the file attributes. On success, the functions return zero, and on error, −1 is returned and
2147: 2384: 975:, and has always referred to inode change time. It is updated any time file metadata stored in the inode changes, such as 2357: 2319: 1128: 2198: 2162:"the shell's $ MAIL monitor ... depends on atime, pronouncing new email with atime($ MAIL) < mtime($ MAIL)" 758: 2081: 2349: 2264: 877: 2329: 836:
as of 2.6.30) – always update atime, which conforms to the behavior defined by POSIX
2418: 1106: 1110: 717: 606: 2304: 2159: 2433: 931: 817:
Current versions of the Linux kernel support four mount options, which can be specified in
693:
size for file system I/O, which can depend upon both the system and the type of file system
690: 795:
publicly criticized the concept and performance impact of atime in 2007, and in 2009, the
519:
members; these fields are defined as part of XSI option in the Single Unix Specification.
8: 2381: 1098: 992: 754: 848: – never update atime of directories, but do update atime of other files 2309:, mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project. 2199:"Linux kernel 4.0, Section 1.5. 'lazytime' option for better update of file timestamps" 802:
option had become the default, which addresses this criticism. The behavior behind the
362:
header file as follows, although implementations are free to define additional fields:
206: 896:, which causes the atime field never to be updated. Turning off atime updating breaks 112: 104: 2353: 116: 2281: 642: 610: 57: 2250: 2049:
A Research Unix reader: annotated excerpts from the Programmer's Manual, 1971–1986
864: – update atime according to specific circumstances laid out below 2398: 2388: 1030: 721: 632: 619: 232:
is defined to 64, these 64-bit functions are available under the original names.
199: 132: 2423: 2047: 1070: 972: 522:
In older versions of POSIX.1 standard, the time-related fields were defined as
45: 2393: 2172: 2086:
The Open Group Base Specifications Issue 6—IEEE Std 1003.1, 2004 Edition
792: 724:. There are many macros to work with the different mode flags and file types. 2412: 183: 21: 2043: 799: 788: 652: 939: 586: 202:
argument instead, and returns attributes of the file that it identifies.
108: 41: 2343: 2123: 971:
timestamp was added in the file system restructuring that occurred with
934:, which was released on April 12, 2015, introduced the new mount option 854: – never update atime of any file or directory; implies 538:. Since the 2008 version of the standard, these fields were renamed to 1038:
is used, or for any other change to the inode other than an update to
70:
uses this system call to retrieve information on files that includes:
984: 713: 662: 623: 144: 120: 2403: 2225: 2135: 2111: 2099: 179: 2335: 2229: 920: 908:" notifications, and some file usage watching utilities, notably 881: 229: 814:
and Debian's popularity counter (popcon) would behave properly.
1056: 885: 75: 699: – number of blocks allocated in multiples of 2160:
http://www.mail-archive.com/mutt-users@mutt.org/msg24912.html
980: 976: 905: 897: 873: 869: 818: 596: 190:
returns attributes of the eventual target of the link, while
164: 140: 49: 2064: 2062: 901: 61: 38: 2059: 66: 2342:
Stevens, W. Richard; Rago, Stephen A. (May 24, 2013).
577:structure includes at least the following members: 959:. The file systems retained just the access time ( 893: 205:The family of functions was extended to implement 2330:IEEE Std 1003.1, 2004, documentation for fstat(2) 2410: 2223: 151:functions, as well as related functions called 2302: 997:(file modification). In some implementations, 751:to certain ideas, incidents, or controversies 683: – time of last status change 2345:Advanced Programming in the UNIX Environment 1109:. There might be a discussion about this on 1005:) and then unlinking the old name (updating 677: – time of last modification 2341: 2068: 900:compliance, and some applications, such as 858:; highest performance, but least compatible 194:returns attributes of the link itself. The 761:this issue before removing this message. 2138:, LWN, by Jonathan Corbet, March 31, 2009 2114:, LWN, by Jonathan Corbet, August 8, 2007 2055:(Technical report). CSTR. Bell Labs. 139. 1129:Learn how and when to remove this message 1024:cannot be set to an arbitrary value with 1009:again) and modern Linux tend to do this. 991:(last status change) update with nonzero 651: – device identifier (if 2306:struct stat.h with nanosecond resolution 20: 2042: 2411: 1060:provides times accurate to one second. 671: – time of last access 2224:Jonathan Corbet (November 19, 2014). 727: 2382:An example showing how to use stat() 2100:Linux: Replacing atime With relatime 1081: 1034:utility, for example. Instead, when 731: 159:. The functions take a pointer to a 107:. It is among the few original Unix 2303:Andreas Jaeger (December 2, 2002), 1049: 985:creation and deletion of hard links 755:create a more balanced presentation 126: 92:ctime: time of last status change ( 13: 2251:"BSTJ version of C.ACM Unix paper" 1046:value is set to the current time. 1042:caused by accessing the file, the 85:mtime: time of last modification ( 14: 2445: 2429:Unix file system-related software 2375: 2265:"pwrite, write - write on a file" 2173:"mount(2) - OpenBSD manual pages" 1069:The resolution of create time on 585: – identifier of 353: 1086: 967:) through 6th edition Unix. The 736: 147:operating systems, declares the 2313: 2296: 2274: 2257: 2243: 2217: 2191: 2165: 951:It is tempting to believe that 550:, respectively, of type struct 2153: 2141: 2136:That massive filesystem thread 2129: 2117: 2105: 2092: 2074: 2036: 716:. It combines the file access 605: – protection 235:The functions are defined as: 1: 2282:"stat(2) - Linux manual page" 2030: 689: – preferred 358:This structure is defined in 832:, and formerly the default; 781:eventually requiring a disk 7: 2350:Addison-Wesley Professional 2102:, by Jeremy, August 7, 2007 777:Reading a file changes its 182:argument. If the file is a 10: 2450: 1077: 1293:"Usage: %s: file ... 963:) and modification time ( 703:(usually 512 bytes). 661: – total 507:POSIX.1 does not require 1140: 946: 923:behaves more like Linux 364: 237: 2338:. Retrieved 2012-06-07. 2332:. Retrieved 2012-06-07. 2088:. The Open Group. 2004. 2069:Stevens & Rago 2013 720:and also indicates any 221:return attributes in a 2336:stat(2) Linux man page 2226:"Introducing lazytime" 2126:, Linux Kernel Newbies 1857:/* you may use %lld */ 1551:"getgrgid()" 1482:"getpwuid()" 987:. POSIX also mandates 167:is set appropriately. 29: 2387:May 11, 2017, at the 932:Linux kernel mainline 24: 2082:"<sys/stat.h>" 1099:confusing or unclear 868:Current versions of 52:. The semantics of 2124:Linux kernel 2.6.30 1164:<sys/types.h> 1107:clarify the section 930:Version 4.0 of the 641: – 631: – 618: – 595: – 534:, and were of type 2404:atime and relatime 2348:(Third ed.). 1413:"stat()" 1182:<sys/stat.h> 728:Criticism of atime 566:can be defined as 209:. Functions named 207:large file support 30: 2203:kernelnewbies.org 1139: 1138: 1131: 1028:, as used by the 775: 774: 753:. Please help to 745:This section may 722:special file type 227:_FILE_OFFSET_BITS 198:function takes a 178:functions take a 117:group permissions 60:. As an example, 58:operating systems 2441: 2370: 2368: 2366: 2322: 2320:MSDN: File Times 2317: 2311: 2310: 2300: 2294: 2293: 2291: 2289: 2278: 2272: 2271: 2261: 2255: 2254: 2247: 2241: 2240: 2238: 2236: 2221: 2215: 2214: 2212: 2210: 2195: 2189: 2188: 2186: 2184: 2179:. April 27, 2018 2169: 2163: 2157: 2151: 2150:, Valerie Aurora 2145: 2139: 2133: 2127: 2121: 2115: 2109: 2103: 2096: 2090: 2089: 2078: 2072: 2066: 2057: 2056: 2054: 2040: 2026: 2023: 2020: 2017: 2014: 2011: 2008: 2005: 2002: 1999: 1996: 1993: 1990: 1987: 1984: 1981: 1978: 1975: 1972: 1969: 1966: 1963: 1960: 1957: 1954: 1951: 1948: 1945: 1942: 1939: 1936: 1933: 1930: 1927: 1924: 1921: 1918: 1915: 1912: 1909: 1906: 1903: 1900: 1897: 1894: 1891: 1888: 1885: 1882: 1879: 1876: 1873: 1870: 1867: 1864: 1861: 1858: 1855: 1852: 1849: 1846: 1843: 1840: 1837: 1834: 1831: 1828: 1825: 1822: 1819: 1816: 1813: 1810: 1807: 1804: 1801: 1798: 1795: 1792: 1789: 1786: 1783: 1780: 1777: 1774: 1771: 1768: 1765: 1762: 1759: 1756: 1753: 1750: 1747: 1744: 1741: 1738: 1735: 1732: 1729: 1726: 1723: 1720: 1717: 1714: 1711: 1708: 1705: 1702: 1699: 1696: 1693: 1690: 1687: 1684: 1681: 1678: 1675: 1672: 1669: 1666: 1663: 1660: 1657: 1654: 1651: 1648: 1645: 1642: 1639: 1636: 1633: 1630: 1627: 1624: 1621: 1618: 1615: 1612: 1609: 1606: 1603: 1600: 1597: 1594: 1591: 1588: 1585: 1582: 1579: 1576: 1573: 1570: 1567: 1564: 1561: 1558: 1555: 1552: 1549: 1546: 1543: 1540: 1537: 1534: 1531: 1528: 1525: 1522: 1519: 1516: 1513: 1510: 1507: 1504: 1501: 1498: 1495: 1492: 1489: 1486: 1483: 1480: 1477: 1474: 1471: 1468: 1465: 1462: 1459: 1456: 1453: 1450: 1447: 1444: 1441: 1438: 1435: 1432: 1429: 1426: 1423: 1420: 1417: 1414: 1411: 1408: 1405: 1402: 1399: 1396: 1393: 1390: 1387: 1384: 1381: 1378: 1375: 1372: 1369: 1366: 1363: 1360: 1357: 1354: 1351: 1348: 1345: 1342: 1339: 1336: 1333: 1330: 1327: 1324: 1321: 1318: 1315: 1312: 1309: 1306: 1303: 1300: 1297: 1294: 1291: 1288: 1285: 1282: 1279: 1276: 1273: 1270: 1267: 1264: 1261: 1258: 1255: 1252: 1249: 1246: 1243: 1240: 1237: 1234: 1231: 1228: 1225: 1222: 1219: 1216: 1213: 1210: 1207: 1204: 1201: 1198: 1195: 1192: 1189: 1186: 1183: 1180: 1177: 1174: 1171: 1168: 1165: 1162: 1159: 1156: 1153: 1152:<stdlib.h> 1150: 1147: 1144: 1134: 1127: 1123: 1120: 1114: 1090: 1089: 1082: 1059: 1050:Time granularity 1045: 1041: 1037: 1033: 1027: 1023: 1019: 1015: 1008: 1004: 1000: 995: 990: 977:file permissions 970: 966: 962: 958: 954: 937: 926: 918: 892:mount option in 891: 863: 857: 853: 847: 841: 835: 831: 827: 813: 809: 805: 798: 780: 770: 767: 740: 739: 732: 711: 702: 698: 688: 682: 676: 670: 660: 650: 643:group identifier 640: 630: 617: 611:Unix permissions 604: 594: 584: 576: 569: 565: 561: 557: 553: 549: 545: 541: 537: 533: 529: 525: 518: 514: 510: 503: 500: 497: 494: 491: 488: 485: 482: 479: 476: 473: 470: 467: 464: 461: 458: 455: 452: 449: 446: 443: 440: 437: 434: 431: 428: 425: 422: 419: 416: 413: 410: 407: 404: 401: 398: 395: 392: 389: 386: 383: 380: 377: 374: 371: 368: 361: 349: 346: 343: 340: 337: 334: 331: 328: 325: 322: 319: 316: 313: 310: 307: 304: 301: 298: 295: 292: 289: 286: 283: 280: 277: 274: 271: 268: 265: 262: 259: 256: 253: 250: 247: 244: 241: 228: 224: 220: 216: 212: 197: 193: 189: 177: 173: 162: 158: 154: 150: 138: 127:stat() functions 111:to change, with 102: 95: 88: 81: 78:of last access ( 69: 55: 35: 27: 16:Unix system call 2449: 2448: 2444: 2443: 2442: 2440: 2439: 2438: 2419:C POSIX library 2409: 2408: 2389:Wayback Machine 2378: 2373: 2364: 2362: 2360: 2325: 2318: 2314: 2301: 2297: 2287: 2285: 2280: 2279: 2275: 2263: 2262: 2258: 2249: 2248: 2244: 2234: 2232: 2222: 2218: 2208: 2206: 2197: 2196: 2192: 2182: 2180: 2171: 2170: 2166: 2158: 2154: 2146: 2142: 2134: 2130: 2122: 2118: 2112:Once upon atime 2110: 2106: 2097: 2093: 2080: 2079: 2075: 2067: 2060: 2052: 2041: 2037: 2033: 2028: 2027: 2024: 2021: 2018: 2015: 2012: 2009: 2006: 2003: 2000: 1997: 1994: 1991: 1988: 1985: 1982: 1979: 1976: 1973: 1970: 1967: 1964: 1962:ctime: %s" 1961: 1958: 1955: 1952: 1949: 1946: 1943: 1940: 1937: 1934: 1931: 1928: 1925: 1922: 1919: 1917:mtime: %s" 1916: 1913: 1910: 1907: 1904: 1901: 1898: 1895: 1892: 1889: 1886: 1883: 1880: 1877: 1874: 1872:atime: %s" 1871: 1868: 1865: 1862: 1859: 1856: 1853: 1850: 1847: 1844: 1841: 1838: 1835: 1832: 1829: 1826: 1823: 1820: 1817: 1814: 1811: 1808: 1805: 1802: 1799: 1796: 1793: 1790: 1787: 1784: 1781: 1778: 1775: 1772: 1769: 1766: 1763: 1760: 1757: 1754: 1751: 1748: 1745: 1742: 1739: 1736: 1733: 1730: 1727: 1724: 1721: 1718: 1715: 1712: 1709: 1706: 1703: 1700: 1697: 1694: 1691: 1688: 1685: 1682: 1679: 1676: 1673: 1670: 1667: 1664: 1661: 1658: 1655: 1652: 1649: 1646: 1643: 1640: 1637: 1634: 1631: 1628: 1625: 1622: 1619: 1616: 1613: 1610: 1607: 1604: 1601: 1598: 1595: 1592: 1589: 1586: 1583: 1580: 1577: 1574: 1571: 1568: 1565: 1562: 1559: 1556: 1553: 1550: 1547: 1544: 1541: 1538: 1535: 1532: 1529: 1526: 1523: 1520: 1517: 1514: 1511: 1508: 1505: 1502: 1499: 1496: 1493: 1490: 1487: 1484: 1481: 1478: 1475: 1472: 1469: 1466: 1463: 1460: 1457: 1454: 1451: 1448: 1445: 1442: 1439: 1436: 1433: 1430: 1427: 1424: 1421: 1418: 1415: 1412: 1409: 1406: 1403: 1400: 1397: 1394: 1391: 1388: 1385: 1382: 1379: 1376: 1373: 1370: 1367: 1364: 1361: 1358: 1355: 1352: 1349: 1346: 1343: 1340: 1337: 1334: 1331: 1328: 1325: 1322: 1319: 1316: 1313: 1310: 1307: 1304: 1301: 1298: 1295: 1292: 1289: 1286: 1283: 1280: 1277: 1274: 1271: 1268: 1265: 1262: 1259: 1256: 1253: 1250: 1247: 1244: 1241: 1238: 1235: 1232: 1229: 1226: 1223: 1220: 1217: 1214: 1211: 1208: 1205: 1202: 1199: 1196: 1193: 1190: 1187: 1184: 1181: 1178: 1175: 1172: 1169: 1166: 1163: 1160: 1157: 1154: 1151: 1148: 1146:<stdio.h> 1145: 1142: 1135: 1124: 1118: 1115: 1104: 1091: 1087: 1080: 1055: 1052: 1043: 1039: 1035: 1029: 1025: 1021: 1017: 1013: 1006: 1002: 998: 993: 988: 968: 964: 960: 956: 952: 949: 935: 924: 916: 889: 861: 855: 851: 845: 839: 833: 829: 825: 811: 807: 803: 796: 778: 771: 765: 762: 741: 737: 730: 709: 706: 700: 696: 686: 680: 674: 668: 658: 648: 638: 633:user identifier 628: 620:reference count 615: 602: 592: 589:containing file 582: 574: 567: 563: 562:. For example, 560:struct timespec 559: 555: 551: 547: 543: 539: 535: 531: 527: 523: 516: 512: 508: 505: 504: 501: 498: 495: 492: 489: 486: 483: 480: 477: 474: 471: 468: 465: 462: 459: 456: 453: 450: 447: 444: 441: 438: 435: 432: 429: 426: 423: 420: 417: 414: 411: 408: 405: 402: 399: 396: 393: 390: 387: 384: 381: 378: 375: 372: 369: 366: 359: 356: 351: 350: 347: 344: 341: 338: 335: 332: 329: 326: 323: 320: 317: 314: 311: 308: 305: 302: 299: 296: 293: 290: 287: 284: 281: 278: 275: 272: 269: 266: 263: 260: 257: 254: 251: 248: 245: 242: 239: 226: 222: 218: 214: 210: 200:file descriptor 195: 191: 187: 175: 171: 160: 156: 152: 148: 136: 133:C POSIX library 129: 115:'s addition of 100: 93: 86: 79: 65: 53: 46:file attributes 33: 25: 17: 12: 11: 5: 2447: 2437: 2436: 2431: 2426: 2421: 2407: 2406: 2401: 2396: 2394:stat() in Perl 2391: 2377: 2376:External links 2374: 2372: 2371: 2359:978-0321637734 2358: 2339: 2333: 2326: 2324: 2323: 2312: 2295: 2273: 2256: 2242: 2216: 2190: 2164: 2152: 2148:Relatime Recap 2140: 2128: 2116: 2104: 2091: 2073: 2058: 2044:McIlroy, M. D. 2034: 2032: 2029: 1692:group: %u (%s) 1644:owner: %u (%s) 1158:<time.h> 1141: 1137: 1136: 1094: 1092: 1085: 1079: 1076: 1075: 1074: 1071:FAT filesystem 1067: 1064: 1061: 1051: 1048: 981:file ownership 973:Version 7 Unix 948: 945: 866: 865: 859: 849: 843: 837: 773: 772: 757:. Discuss and 744: 742: 735: 729: 726: 705: 704: 694: 684: 678: 672: 666: 656: 646: 636: 626: 613: 600: 590: 579: 568:st_atim.tv_sec 365: 355: 354:stat structure 352: 238: 128: 125: 105:Version 1 Unix 98: 97: 90: 83: 15: 9: 6: 4: 3: 2: 2446: 2435: 2432: 2430: 2427: 2425: 2422: 2420: 2417: 2416: 2414: 2405: 2402: 2400: 2399:stat() in PHP 2397: 2395: 2392: 2390: 2386: 2383: 2380: 2379: 2361: 2355: 2351: 2347: 2346: 2340: 2337: 2334: 2331: 2328: 2327: 2321: 2316: 2308: 2307: 2299: 2283: 2277: 2270: 2266: 2260: 2252: 2246: 2231: 2227: 2220: 2205:. May 1, 2015 2204: 2200: 2194: 2183:September 26, 2178: 2174: 2168: 2161: 2156: 2149: 2144: 2137: 2132: 2125: 2120: 2113: 2108: 2101: 2098:Kernel Trap: 2095: 2087: 2083: 2077: 2071:, p. 94. 2070: 2065: 2063: 2051: 2050: 2045: 2039: 2035: 1176:<grp.h> 1170:<pwd.h> 1133: 1130: 1122: 1112: 1111:the talk page 1108: 1102: 1100: 1095:This section 1093: 1084: 1083: 1072: 1068: 1065: 1062: 1058: 1054: 1053: 1047: 1032: 1010: 996: 986: 982: 978: 974: 944: 941: 933: 928: 922: 913: 911: 907: 904:-driven "new 903: 899: 895: 887: 883: 879: 875: 871: 860: 850: 844: 838: 824: 823: 822: 820: 815: 801: 794: 790: 786: 784: 769: 760: 756: 752: 750: 743: 734: 733: 725: 723: 719: 715: 695: 692: 685: 679: 673: 667: 664: 657: 654: 647: 644: 637: 634: 627: 625: 621: 614: 612: 608: 601: 598: 591: 588: 581: 580: 578: 571: 520: 363: 236: 233: 231: 223:struct stat64 208: 203: 201: 185: 184:symbolic link 181: 168: 166: 146: 142: 134: 124: 122: 118: 114: 110: 106: 91: 84: 77: 73: 72: 71: 68: 63: 59: 56:vary between 51: 47: 44:that returns 43: 40: 36: 23: 19: 2434:System calls 2365:February 27, 2363:. Retrieved 2344: 2315: 2305: 2298: 2288:February 27, 2286:. Retrieved 2276: 2268: 2259: 2245: 2233:. Retrieved 2219: 2207:. Retrieved 2202: 2193: 2181:. Retrieved 2176: 2167: 2155: 2143: 2131: 2119: 2107: 2094: 2085: 2076: 2048: 2038: 1563:EXIT_FAILURE 1494:EXIT_FAILURE 1425:EXIT_FAILURE 1317:EXIT_FAILURE 1125: 1119:January 2023 1116: 1105:Please help 1096: 1011: 950: 929: 914: 867: 816: 789:Linux kernel 787: 782: 776: 763: 749:undue weight 746: 707: 653:special file 572: 521: 506: 357: 234: 204: 169: 130: 109:system calls 103:appeared in 99: 32: 31: 28:command line 18: 2177:openbsd.org 834:strictatime 826:strictatime 793:Ingo Molnár 712:field is a 609:; see also 575:struct stat 161:struct stat 139:, found on 119:and larger 42:system call 2413:Categories 2284:. man7.org 2031:References 1101:to readers 919:option on 894:/etc/fstab 888:support a 856:nodiratime 846:nodiratime 828:(formerly 791:developer 766:March 2015 687:st_blksize 665:, in bytes 624:hard links 558:member of 517:st_blksize 487:st_blksize 360:sys/stat.h 143:and other 137:sys/stat.h 1833:size: %ld 1797:links: %d 1740:perms: %o 1608:inode: %u 1578:"%s: 714:bit field 701:DEV_BSIZE 697:st_blocks 663:file size 513:st_blocks 496:st_blocks 484:blksize_t 219:fstat64() 215:lstat64() 145:Unix-like 121:file size 113:Version 4 48:about an 2385:Archived 2046:(1987). 1815:st_nlink 1524:getgrgid 1455:getpwuid 1179:#include 1173:#include 1167:#include 1161:#include 1155:#include 1149:#include 1143:#include 936:lazytime 925:relatime 910:tmpwatch 862:lazytime 840:relatime 812:tmpwatch 808:relatime 804:relatime 797:relatime 681:st_ctime 675:st_mtime 669:st_atime 645:of owner 635:of owner 616:st_nlink 564:st_atime 552:timespec 532:st_ctime 528:st_mtime 524:st_atime 493:blkcnt_t 475:timespec 463:timespec 451:timespec 415:st_nlink 330:filedesc 297:filename 258:filename 211:stat64() 180:filename 64:command 2230:LWN.net 1983:st_ctim 1938:st_mtim 1893:st_atim 1851:st_size 1779:S_IRWXO 1773:S_IRWXG 1767:S_IRWXU 1758:st_mode 1722:gr_name 1674:pw_name 1281:fprintf 1097:may be 1078:Example 1036:utime() 1026:utime() 1012:Unlike 994:write() 921:OpenBSD 917:noatime 890:noatime 882:FreeBSD 878:Solaris 852:noatime 759:resolve 710:st_mode 659:st_size 649:st_rdev 603:st_mode 548:st_ctim 544:st_mtim 540:st_atim 509:st_rdev 478:st_ctim 466:st_mtim 454:st_atim 442:st_size 412:nlink_t 406:st_rdev 379:st_mode 196:fstat() 192:lstat() 176:lstat() 157:lstat() 153:fstat() 135:header 74:atime: 2356:  2235:May 2, 2209:May 2, 2016:return 2007:" 2001:" 1995:printf 1989:tv_sec 1956:" 1950:printf 1944:tv_sec 1911:" 1905:printf 1899:tv_sec 1866:" 1860:printf 1839:" 1827:" 1821:printf 1803:" 1791:" 1785:printf 1746:" 1734:" 1728:printf 1716:grpnam 1710:st_gid 1698:" 1686:" 1680:printf 1668:pwuser 1662:st_uid 1650:" 1638:" 1632:printf 1626:st_ino 1614:" 1602:" 1596:printf 1584:" 1572:printf 1545:perror 1536:st_gid 1518:grpnam 1476:perror 1467:st_uid 1449:pwuser 1407:perror 1299:" 1287:stderr 1254:grpnam 1245:struct 1239:pwuser 1233:passwd 1230:struct 1218:struct 1057:time_t 983:, and 886:NetBSD 884:, and 783:write, 639:st_gid 629:st_uid 599:number 593:st_ino 587:device 583:st_dev 556:tv_sec 536:time_t 472:struct 460:struct 448:struct 433:st_gid 424:st_uid 397:st_dev 388:st_ino 376:mode_t 367:struct 336:struct 303:struct 264:struct 188:stat() 172:stat() 149:stat() 94:ls -lc 80:ls -lu 54:stat() 34:stat() 2424:POSIX 2053:(PDF) 1974:& 1968:ctime 1929:& 1923:ctime 1884:& 1878:ctime 1761:& 1719:-> 1671:-> 1395:& 1248:group 1044:ctime 1040:atime 1031:touch 1022:ctime 1018:mtime 1014:atime 1007:ctime 1003:ctime 999:ctime 989:ctime 969:ctime 965:mtime 961:atime 957:ctime 953:ctime 947:ctime 898:POSIX 874:macOS 870:Linux 830:atime 819:fstab 800:mount 779:atime 747:lend 718:modes 691:block 597:inode 439:off_t 430:gid_t 421:uid_t 403:dev_t 394:dev_t 385:ino_t 321:fstat 288:const 282:lstat 249:const 230:macro 165:errno 141:POSIX 87:ls -l 50:inode 37:is a 2367:2015 2354:ISBN 2290:2015 2237:2015 2211:2015 2185:2018 1590:argv 1557:exit 1509:NULL 1488:exit 1440:NULL 1419:exit 1389:argv 1383:stat 1353:argc 1350:< 1311:exit 1305:argv 1269:< 1266:argc 1221:stat 1209:argv 1203:char 1197:argc 1188:main 1016:and 940:sync 915:The 906:mail 902:mbox 708:The 607:mode 573:The 546:and 530:and 515:and 370:stat 339:stat 306:stat 291:char 267:stat 252:char 243:stat 217:and 174:and 170:The 155:and 131:The 101:stat 76:time 62:Unix 39:Unix 26:stat 1992:)); 1947:)); 1902:)); 1782:)); 1539:))) 1470:))) 1332:int 1326:for 1194:int 1185:int 622:of 345:buf 327:int 318:int 312:buf 279:int 273:buf 240:int 2415:: 2352:. 2267:. 2228:. 2201:. 2175:. 2084:. 2061:^ 2010:); 2004:\n 1977:sb 1959:\t 1932:sb 1914:\t 1887:sb 1869:\t 1854:); 1845:sb 1836:\n 1830:\t 1818:); 1809:sb 1800:\n 1794:\t 1752:sb 1743:\n 1737:\t 1725:); 1704:sb 1695:\n 1689:\t 1677:); 1656:sb 1647:\n 1641:\t 1629:); 1620:sb 1611:\n 1605:\t 1593:); 1581:\n 1566:); 1554:); 1530:sb 1512:== 1503:if 1497:); 1485:); 1461:sb 1443:== 1434:if 1428:); 1416:); 1401:)) 1398:sb 1380:== 1377:-1 1371:if 1362:++ 1320:); 1308:); 1296:\n 1260:if 1224:sb 1020:, 979:, 927:. 912:. 880:, 876:, 872:, 821:: 570:. 542:, 526:, 511:, 502:}; 348:); 315:); 276:); 213:, 186:, 123:. 67:ls 2369:. 2292:. 2253:. 2239:. 2213:. 2187:. 2025:} 2022:; 2019:0 2013:} 1998:( 1986:. 1980:. 1971:( 1965:, 1953:( 1941:. 1935:. 1926:( 1920:, 1908:( 1896:. 1890:. 1881:( 1875:, 1863:( 1848:. 1842:, 1824:( 1812:. 1806:, 1788:( 1776:| 1770:| 1764:( 1755:. 1749:, 1731:( 1713:, 1707:. 1701:, 1683:( 1665:, 1659:. 1653:, 1635:( 1623:. 1617:, 1599:( 1587:, 1575:( 1569:} 1560:( 1548:( 1542:{ 1533:. 1527:( 1521:= 1515:( 1506:( 1500:} 1491:( 1479:( 1473:{ 1464:. 1458:( 1452:= 1446:( 1437:( 1431:} 1422:( 1410:( 1404:{ 1392:, 1386:( 1374:( 1368:{ 1365:) 1359:i 1356:; 1347:i 1344:; 1341:1 1338:= 1335:i 1329:( 1323:} 1314:( 1302:, 1290:, 1284:( 1278:{ 1275:) 1272:2 1263:( 1257:; 1251:* 1242:; 1236:* 1227:; 1215:{ 1212:) 1206:* 1200:, 1191:( 1132:) 1126:( 1121:) 1117:( 1113:. 1103:. 768:) 764:( 655:) 499:; 490:; 481:; 469:; 457:; 445:; 436:; 427:; 418:; 409:; 400:; 391:; 382:; 373:{ 342:* 333:, 324:( 309:* 300:, 294:* 285:( 270:* 261:, 255:* 246:( 96:) 89:) 82:)

Index


Unix
system call
file attributes
inode
operating systems
Unix
ls
time
Version 1 Unix
system calls
Version 4
group permissions
file size
C POSIX library
POSIX
Unix-like
errno
filename
symbolic link
file descriptor
large file support
macro
device
inode
mode
Unix permissions
reference count
hard links
user identifier

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.