]>
Commit | Line | Data |
---|---|---|
9905e59b DH |
1 | .\" Copyright (c) 2017 David Howells <dhowells@redhat.com> |
2 | .\" | |
3 | .\" Derived from the stat.2 manual page: | |
4 | .\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992 | |
5 | .\" Parts Copyright (c) 1995 Nicolai Langfeldt (janl@ifi.uio.no), 1/1/95 | |
6 | .\" and Copyright (c) 2006, 2007, 2014 Michael Kerrisk <mtk.manpages@gmail.com> | |
7 | .\" | |
5fbde956 | 8 | .\" SPDX-License-Identifier: Linux-man-pages-copyleft |
9905e59b | 9 | .\" |
6e00b7a8 | 10 | .TH STATX 2 2021-08-27 "Linux" "Linux Programmer's Manual" |
9905e59b | 11 | .SH NAME |
835f4293 | 12 | statx \- get file status (extended) |
9905e59b DH |
13 | .SH SYNOPSIS |
14 | .nf | |
c9f3f849 | 15 | .BR "#include <fcntl.h> " "/* Definition of " AT_* " constants */" |
9905e59b | 16 | .B #include <sys/stat.h> |
dbfe9c70 | 17 | .PP |
049d7f92 AC |
18 | .BI "int statx(int " dirfd ", const char *restrict " pathname ", int " flags , |
19 | .BI " unsigned int " mask ", struct statx *restrict " statxbuf ); | |
9905e59b | 20 | .fi |
9905e59b | 21 | .SH DESCRIPTION |
9905e59b DH |
22 | This function returns information about a file, storing it in the buffer |
23 | pointed to by | |
15d1f5ac | 24 | .IR statxbuf . |
c8701baf | 25 | The returned buffer is a structure of the following type: |
9905e59b DH |
26 | .PP |
27 | .in +4n | |
b8302363 | 28 | .EX |
9905e59b | 29 | struct statx { |
77a09ad7 MK |
30 | __u32 stx_mask; /* Mask of bits indicating |
31 | filled fields */ | |
32 | __u32 stx_blksize; /* Block size for filesystem I/O */ | |
33 | __u64 stx_attributes; /* Extra file attribute indicators */ | |
34 | __u32 stx_nlink; /* Number of hard links */ | |
35 | __u32 stx_uid; /* User ID of owner */ | |
36 | __u32 stx_gid; /* Group ID of owner */ | |
37 | __u16 stx_mode; /* File type and mode */ | |
38 | __u64 stx_ino; /* Inode number */ | |
39 | __u64 stx_size; /* Total size in bytes */ | |
40 | __u64 stx_blocks; /* Number of 512B blocks allocated */ | |
aabbefb4 | 41 | __u64 stx_attributes_mask; |
861d36ba | 42 | /* Mask to show what\(aqs supported |
aabbefb4 | 43 | in stx_attributes */ |
6a4667aa MK |
44 | |
45 | /* The following fields are file timestamps */ | |
46 | struct statx_timestamp stx_atime; /* Last access */ | |
47 | struct statx_timestamp stx_btime; /* Creation */ | |
48 | struct statx_timestamp stx_ctime; /* Last status change */ | |
49 | struct statx_timestamp stx_mtime; /* Last modification */ | |
50 | ||
20c8cd9a MK |
51 | /* If this file represents a device, then the next two |
52 | fields contain the ID of the device */ | |
77a09ad7 MK |
53 | __u32 stx_rdev_major; /* Major ID */ |
54 | __u32 stx_rdev_minor; /* Minor ID */ | |
6a4667aa MK |
55 | |
56 | /* The next two fields contain the ID of the device | |
790314d7 | 57 | containing the filesystem where the file resides */ |
77a09ad7 MK |
58 | __u32 stx_dev_major; /* Major ID */ |
59 | __u32 stx_dev_minor; /* Minor ID */ | |
728009a4 | 60 | __u64 stx_mnt_id; /* Mount ID */ |
9905e59b | 61 | }; |
b8302363 | 62 | .EE |
9905e59b DH |
63 | .in |
64 | .PP | |
6a4667aa | 65 | The file timestamps are structures of the following type: |
9905e59b DH |
66 | .PP |
67 | .in +4n | |
b8302363 | 68 | .EX |
9905e59b | 69 | struct statx_timestamp { |
6a4667aa | 70 | __s64 tv_sec; /* Seconds since the Epoch (UNIX time) */ |
aabbefb4 | 71 | __u32 tv_nsec; /* Nanoseconds since tv_sec */ |
9905e59b | 72 | }; |
b8302363 | 73 | .EE |
9905e59b DH |
74 | .in |
75 | .PP | |
790314d7 | 76 | (Note that reserved space and padding is omitted.) |
9905e59b DH |
77 | .SS |
78 | Invoking \fBstatx\fR(): | |
14b5d02a MK |
79 | To access a file's status, no permissions are required on the file itself, |
80 | but in the case of | |
9905e59b | 81 | .BR statx () |
835f4293 | 82 | with a pathname, |
14b5d02a | 83 | execute (search) permission is required on all of the directories in |
9905e59b DH |
84 | .I pathname |
85 | that lead to the file. | |
86 | .PP | |
87 | .BR statx () | |
88 | uses | |
6a4667aa MK |
89 | .IR pathname , |
90 | .IR dirfd , | |
91 | and | |
92 | .IR flags | |
56a05af6 | 93 | to identify the target file in one of the following ways: |
9905e59b | 94 | .TP |
7e43caf4 MK |
95 | An absolute pathname |
96 | If | |
9905e59b | 97 | .I pathname |
7e43caf4 MK |
98 | begins with a slash, |
99 | then it is an absolute pathname that identifies the target file. | |
100 | In this case, | |
9905e59b | 101 | .I dirfd |
14b5d02a | 102 | is ignored. |
9905e59b | 103 | .TP |
7e43caf4 MK |
104 | A relative pathname |
105 | If | |
9905e59b | 106 | .I pathname |
7e43caf4 | 107 | is a string that begins with a character other than a slash and |
6a4667aa MK |
108 | .IR dirfd |
109 | is | |
7e43caf4 MK |
110 | .BR AT_FDCWD , |
111 | then | |
112 | .I pathname | |
113 | is a relative pathname that is interpreted relative to the process's | |
114 | current working directory. | |
9905e59b | 115 | .TP |
aabbefb4 | 116 | A directory-relative pathname |
7e43caf4 | 117 | If |
9905e59b | 118 | .I pathname |
7e43caf4 | 119 | is a string that begins with a character other than a slash and |
9905e59b | 120 | .I dirfd |
7e43caf4 MK |
121 | is a file descriptor that refers to a directory, then |
122 | .I pathname | |
123 | is a relative pathname that is interpreted relative to the directory | |
124 | referred to by | |
9905e59b | 125 | .IR dirfd . |
717c3a7d MK |
126 | (See |
127 | .BR openat (2) | |
128 | for an explanation of why this is useful.) | |
9905e59b | 129 | .TP |
7e43caf4 MK |
130 | By file descriptor |
131 | If | |
77a09ad7 | 132 | .IR pathname |
85dbf7cd | 133 | is an empty string and the |
7e43caf4 | 134 | .B AT_EMPTY_PATH |
85dbf7cd MK |
135 | flag is specified in |
136 | .IR flags | |
137 | (see below), | |
138 | then the target file is the one referred to by the file descriptor | |
139 | .IR dirfd . | |
9905e59b DH |
140 | .PP |
141 | .I flags | |
835f4293 | 142 | can be used to influence a pathname-based lookup. |
14b5d02a | 143 | A value for |
9905e59b | 144 | .I flags |
c8701baf | 145 | is constructed by ORing together zero or more of the following constants: |
9905e59b DH |
146 | .TP |
147 | .BR AT_EMPTY_PATH | |
148 | .\" commit 65cfc6722361570bfe255698d9cd4dccaf47570d | |
149 | If | |
150 | .I pathname | |
151 | is an empty string, operate on the file referred to by | |
152 | .IR dirfd | |
153 | (which may have been obtained using the | |
154 | .BR open (2) | |
155 | .B O_PATH | |
156 | flag). | |
85dbf7cd MK |
157 | In this case, |
158 | .I dirfd | |
159 | can refer to any type of file, not just a directory. | |
efeece04 | 160 | .IP |
9905e59b DH |
161 | If |
162 | .I dirfd | |
163 | is | |
164 | .BR AT_FDCWD , | |
165 | the call operates on the current working directory. | |
efeece04 | 166 | .IP |
9905e59b DH |
167 | This flag is Linux-specific; define |
168 | .B _GNU_SOURCE | |
169 | .\" Before glibc 2.16, defining _ATFILE_SOURCE sufficed | |
170 | to obtain its definition. | |
171 | .TP | |
172 | .BR AT_NO_AUTOMOUNT | |
173 | Don't automount the terminal ("basename") component of | |
174 | .I pathname | |
175 | if it is a directory that is an automount point. | |
176 | This allows the caller to gather attributes of an automount point | |
177 | (rather than the location it would mount). | |
178 | This flag can be used in tools that scan directories | |
179 | to prevent mass-automounting of a directory of automount points. | |
180 | The | |
181 | .B AT_NO_AUTOMOUNT | |
182 | flag has no effect if the mount point has already been mounted over. | |
183 | This flag is Linux-specific; define | |
184 | .B _GNU_SOURCE | |
185 | .\" Before glibc 2.16, defining _ATFILE_SOURCE sufficed | |
186 | to obtain its definition. | |
187 | .TP | |
188 | .B AT_SYMLINK_NOFOLLOW | |
189 | If | |
190 | .I pathname | |
191 | is a symbolic link, do not dereference it: | |
192 | instead return information about the link itself, like | |
6a4667aa | 193 | .BR lstat (2). |
9905e59b DH |
194 | .PP |
195 | .I flags | |
14b5d02a MK |
196 | can also be used to control what sort of synchronization the kernel will do |
197 | when querying a file on a remote filesystem. | |
c8701baf | 198 | This is done by ORing in one of the following values: |
9905e59b | 199 | .TP |
709f7bb6 | 200 | .B AT_STATX_SYNC_AS_STAT |
9905e59b | 201 | Do whatever |
6a4667aa | 202 | .BR stat (2) |
14b5d02a | 203 | does. |
56a05af6 | 204 | This is the default and is very much filesystem-specific. |
9905e59b | 205 | .TP |
709f7bb6 | 206 | .B AT_STATX_FORCE_SYNC |
46711e96 | 207 | Force the attributes to be synchronized with the server. |
14b5d02a | 208 | This may require that |
9905e59b DH |
209 | a network filesystem perform a data writeback to get the timestamps correct. |
210 | .TP | |
709f7bb6 | 211 | .B AT_STATX_DONT_SYNC |
46711e96 | 212 | Don't synchronize anything, but rather just take whatever |
ffe297ee | 213 | the system has cached if possible. |
14b5d02a | 214 | This may mean that the information returned is approximate, but, |
9905e59b DH |
215 | on a network filesystem, it may not involve a round trip to the server - even |
216 | if no lease is held. | |
217 | .PP | |
218 | The | |
219 | .I mask | |
220 | argument to | |
221 | .BR statx () | |
222 | is used to tell the kernel which fields the caller is interested in. | |
223 | .I mask | |
c8701baf | 224 | is an ORed combination of the following constants: |
9905e59b DH |
225 | .PP |
226 | .in +4n | |
227 | .TS | |
228 | lB l. | |
229 | STATX_TYPE Want stx_mode & S_IFMT | |
af2d18b2 | 230 | STATX_MODE Want stx_mode & \(tiS_IFMT |
9905e59b DH |
231 | STATX_NLINK Want stx_nlink |
232 | STATX_UID Want stx_uid | |
233 | STATX_GID Want stx_gid | |
f4572b65 MK |
234 | STATX_ATIME Want stx_atime |
235 | STATX_MTIME Want stx_mtime | |
236 | STATX_CTIME Want stx_ctime | |
9905e59b DH |
237 | STATX_INO Want stx_ino |
238 | STATX_SIZE Want stx_size | |
239 | STATX_BLOCKS Want stx_blocks | |
240 | STATX_BASIC_STATS [All of the above] | |
f4572b65 | 241 | STATX_BTIME Want stx_btime |
728009a4 | 242 | STATX_MNT_ID Want stx_mnt_id (since Linux 5.8) |
9905e59b DH |
243 | STATX_ALL [All currently available fields] |
244 | .TE | |
245 | .in | |
246 | .PP | |
c031ffcc | 247 | Note that, in general, the kernel does |
393c5b58 MK |
248 | .I not |
249 | reject values in | |
250 | .I mask | |
251 | other than the above. | |
c031ffcc MK |
252 | (For an exception, see |
253 | .B EINVAL | |
254 | in errors.) | |
393c5b58 MK |
255 | Instead, it simply informs the caller which values are supported |
256 | by this kernel and filesystem via the | |
257 | .I statx.stx_mask | |
258 | field. | |
259 | Therefore, | |
260 | .I "do not" | |
9905e59b DH |
261 | simply set |
262 | .I mask | |
709f7bb6 MK |
263 | to |
264 | .B UINT_MAX | |
393c5b58 | 265 | (all bits set), |
709f7bb6 | 266 | as one or more bits may, in the future, be used to specify an |
9905e59b DH |
267 | extension to the buffer. |
268 | .SS | |
269 | The returned information | |
9905e59b DH |
270 | The status information for the target file is returned in the |
271 | .I statx | |
272 | structure pointed to by | |
15d1f5ac | 273 | .IR statxbuf . |
9905e59b DH |
274 | Included in this is |
275 | .I stx_mask | |
276 | which indicates what other information has been returned. | |
277 | .I stx_mask | |
790314d7 MK |
278 | has the same format as the |
279 | .I mask | |
280 | argument and bits are set in it to indicate | |
9905e59b DH |
281 | which fields have been filled in. |
282 | .PP | |
ffe297ee MK |
283 | It should be noted that the kernel may return fields that weren't |
284 | requested and may fail to return fields that were requested, | |
285 | depending on what the backing filesystem supports. | |
c859dfb5 | 286 | (Fields that are given values despite being unrequested can just be ignored.) |
14b5d02a | 287 | In either case, |
9905e59b DH |
288 | .I stx_mask |
289 | will not be equal | |
290 | .IR mask . | |
291 | .PP | |
ffe297ee MK |
292 | If a filesystem does not support a field or if it has |
293 | an unrepresentable value (for instance, a file with an exotic type), | |
294 | then the mask bit corresponding to that field will be cleared in | |
9905e59b DH |
295 | .I stx_mask |
296 | even if the user asked for it and a dummy value will be filled in for | |
835f4293 | 297 | compatibility purposes if one is available (e.g., a dummy UID and GID may be |
9905e59b DH |
298 | specified to mount under some circumstances). |
299 | .PP | |
300 | A filesystem may also fill in fields that the caller didn't ask for if it has | |
835f4293 | 301 | values for them available and the information is available at no extra cost. |
14b5d02a | 302 | If this happens, the corresponding bits will be set in |
9905e59b DH |
303 | .IR stx_mask . |
304 | .PP | |
9905e59b DH |
305 | .\" Background: inode attributes are modified with i_mutex held, but |
306 | .\" read by stat() without taking the mutex. | |
835f4293 MK |
307 | .IR Note : |
308 | for performance and simplicity reasons, different fields in the | |
9905e59b DH |
309 | .I statx |
310 | structure may contain state information from different moments | |
311 | during the execution of the system call. | |
312 | For example, if | |
313 | .IR stx_mode | |
314 | or | |
315 | .IR stx_uid | |
316 | is changed by another process by calling | |
317 | .BR chmod (2) | |
318 | or | |
319 | .BR chown (2), | |
320 | .BR stat () | |
321 | might return the old | |
322 | .I stx_mode | |
323 | together with the new | |
324 | .IR stx_uid , | |
325 | or the old | |
326 | .I stx_uid | |
327 | together with the new | |
328 | .IR stx_mode . | |
329 | .PP | |
77a09ad7 MK |
330 | Apart from |
331 | .I stx_mask | |
332 | (which is described above), the fields in the | |
9905e59b DH |
333 | .I statx |
334 | structure are: | |
335 | .TP | |
13470fd3 MK |
336 | .I stx_blksize |
337 | The "preferred" block size for efficient filesystem I/O. | |
338 | (Writing to a file in | |
339 | smaller chunks may cause an inefficient read-modify-rewrite.) | |
340 | .TP | |
341 | .I stx_attributes | |
342 | Further status information about the file (see below for more information). | |
343 | .TP | |
344 | .I stx_nlink | |
345 | The number of hard links on a file. | |
346 | .TP | |
347 | .I stx_uid | |
348 | This field contains the user ID of the owner of the file. | |
349 | .TP | |
350 | .I stx_gid | |
351 | This field contains the ID of the group owner of the file. | |
aabbefb4 | 352 | .TP |
9905e59b | 353 | .I stx_mode |
14b5d02a | 354 | The file type and mode. |
19cda35d MK |
355 | See |
356 | .BR inode (7) | |
357 | for details. | |
9905e59b | 358 | .TP |
fc31d730 MK |
359 | .I stx_ino |
360 | The inode number of the file. | |
361 | .TP | |
9905e59b DH |
362 | .I stx_size |
363 | The size of the file (if it is a regular file or a symbolic link) in bytes. | |
ffe297ee MK |
364 | The size of a symbolic link is the length of the pathname it contains, |
365 | without a terminating null byte. | |
9905e59b DH |
366 | .TP |
367 | .I stx_blocks | |
368 | The number of blocks allocated to the file on the medium, in 512-byte units. | |
369 | (This may be smaller than | |
370 | .IR stx_size /512 | |
371 | when the file has holes.) | |
372 | .TP | |
13470fd3 MK |
373 | .I stx_attributes_mask |
374 | A mask indicating which bits in | |
375 | .IR stx_attributes | |
376 | are supported by the VFS and the filesystem. | |
9905e59b DH |
377 | .TP |
378 | .I stx_atime | |
379 | The file's last access timestamp. | |
9905e59b DH |
380 | .TP |
381 | .I stx_btime | |
14b5d02a | 382 | The file's creation timestamp. |
9905e59b DH |
383 | .TP |
384 | .I stx_ctime | |
14b5d02a | 385 | The file's last status change timestamp. |
9905e59b DH |
386 | .TP |
387 | .I stx_mtime | |
14b5d02a | 388 | The file's last modification timestamp. |
13470fd3 MK |
389 | .TP |
390 | .IR stx_dev_major " and " stx_dev_minor | |
391 | The device on which this file (inode) resides. | |
392 | .TP | |
393 | .IR stx_rdev_major " and " stx_rdev_minor | |
394 | The device that this file (inode) represents if the file is of block or | |
395 | character device type. | |
728009a4 N |
396 | .TP |
397 | .I stx_mnt_id | |
398 | .\" commit fa2fcf4f1df1559a0a4ee0f46915b496cc2ebf60 | |
053132a8 MK |
399 | The mount ID of the mount containing the file. |
400 | This is the same number reported by | |
728009a4 N |
401 | .BR name_to_handle_at (2) |
402 | and corresponds to the number in the first field in one of the records in | |
403 | .IR /proc/self/mountinfo . | |
9905e59b | 404 | .PP |
19cda35d MK |
405 | For further information on the above fields, see |
406 | .BR inode (7). | |
14b5d02a | 407 | .\" |
9905e59b | 408 | .SS File attributes |
9905e59b DH |
409 | The |
410 | .I stx_attributes | |
c8701baf | 411 | field contains a set of ORed flags that indicate additional attributes |
aabbefb4 MK |
412 | of the file. |
413 | Note that any attribute that is not indicated as supported by | |
414 | .I stx_attributes_mask | |
415 | has no usable value here. | |
416 | The bits in | |
417 | .I stx_attributes_mask | |
418 | correspond bit-by-bit to | |
419 | .IR stx_attributes . | |
efeece04 | 420 | .PP |
aabbefb4 | 421 | The flags are as follows: |
9905e59b | 422 | .TP |
77a09ad7 | 423 | .B STATX_ATTR_COMPRESSED |
56a05af6 MK |
424 | The file is compressed by the filesystem and may take extra resources |
425 | to access. | |
9905e59b | 426 | .TP |
77a09ad7 | 427 | .B STATX_ATTR_IMMUTABLE |
ffe297ee MK |
428 | The file cannot be modified: it cannot be deleted or renamed, |
429 | no hard links can be created to this file and no data can be written to it. | |
709f7bb6 MK |
430 | See |
431 | .BR chattr (1). | |
9905e59b | 432 | .TP |
77a09ad7 | 433 | .B STATX_ATTR_APPEND |
14b5d02a MK |
434 | The file can only be opened in append mode for writing. |
435 | Random access writing | |
436 | is not permitted. | |
709f7bb6 MK |
437 | See |
438 | .BR chattr (1). | |
9905e59b | 439 | .TP |
77a09ad7 | 440 | .B STATX_ATTR_NODUMP |
709f7bb6 MK |
441 | File is not a candidate for backup when a backup program such as |
442 | .BR dump (8) | |
443 | is run. | |
444 | See | |
445 | .BR chattr (1). | |
9905e59b | 446 | .TP |
77a09ad7 | 447 | .B STATX_ATTR_ENCRYPTED |
9905e59b | 448 | A key is required for the file to be encrypted by the filesystem. |
ba2a5200 | 449 | .TP |
c436f71f MK |
450 | .BR STATX_ATTR_VERITY " (since Linux 5.5)" |
451 | .\" commit 3ad2522c64cff1f5aebb987b00683268f0cc7c29 | |
452 | The file has fs-verity enabled. | |
453 | It cannot be written to, and all reads from it will be verified | |
454 | against a cryptographic hash that covers the | |
455 | entire file (e.g., via a Merkle tree). | |
38ad6a88 | 456 | .TP |
2e335632 | 457 | .BR STATX_ATTR_DAX " (since Linux 5.8)" |
c9e6c5ab MK |
458 | The file is in the DAX (cpu direct access) state. |
459 | DAX state attempts to | |
38ad6a88 IW |
460 | minimize software cache effects for both I/O and memory mappings of this file. |
461 | It requires a file system which has been configured to support DAX. | |
2e335632 | 462 | .IP |
c9e6c5ab MK |
463 | DAX generally assumes all accesses are via CPU load / store instructions |
464 | which can minimize overhead for small accesses, | |
465 | but may adversely affect CPU utilization for large transfers. | |
2e335632 | 466 | .IP |
38ad6a88 | 467 | File I/O is done directly to/from user-space buffers and memory mapped I/O may |
c9e6c5ab | 468 | be performed with direct memory mappings that bypass the kernel page cache. |
2e335632 | 469 | .IP |
38ad6a88 | 470 | While the DAX property tends to result in data being transferred synchronously, |
c9e6c5ab MK |
471 | it does not give the same guarantees as the |
472 | .B O_SYNC | |
473 | flag (see | |
474 | .BR open (2)), | |
475 | where data and the necessary metadata are transferred together. | |
2e335632 | 476 | .IP |
c9e6c5ab MK |
477 | A DAX file may support being mapped with the |
478 | .B MAP_SYNC | |
479 | flag, which enables a | |
38ad6a88 IW |
480 | program to use CPU cache flush instructions to persist CPU store operations |
481 | without an explicit | |
c9e6c5ab | 482 | .BR fsync (2). |
38ad6a88 | 483 | See |
c9e6c5ab | 484 | .BR mmap (2) |
38ad6a88 | 485 | for more information. |
9905e59b DH |
486 | .SH RETURN VALUE |
487 | On success, zero is returned. | |
488 | On error, \-1 is returned, and | |
489 | .I errno | |
f6a4078b | 490 | is set to indicate the error. |
9905e59b DH |
491 | .SH ERRORS |
492 | .TP | |
9905e59b DH |
493 | .B EACCES |
494 | Search permission is denied for one of the directories | |
495 | in the path prefix of | |
496 | .IR pathname . | |
497 | (See also | |
498 | .BR path_resolution (7).) | |
499 | .TP | |
500 | .B EBADF | |
9f4e736a MK |
501 | .I pathname |
502 | is relative but | |
9905e59b | 503 | .I dirfd |
9f4e736a MK |
504 | is neither |
505 | .B AT_FDCWD | |
506 | nor a valid file descriptor. | |
9905e59b DH |
507 | .TP |
508 | .B EFAULT | |
09ff9f4a MK |
509 | .I pathname |
510 | or | |
15d1f5ac | 511 | .I statxbuf |
09ff9f4a MK |
512 | is NULL or points to a location outside the process's |
513 | accessible address space. | |
9905e59b | 514 | .TP |
1b206bd8 MK |
515 | .B EINVAL |
516 | Invalid flag specified in | |
517 | .IR flags . | |
518 | .TP | |
aabbefb4 MK |
519 | .B EINVAL |
520 | Reserved flag specified in | |
521 | .IR mask . | |
c031ffcc MK |
522 | (Currently, there is one such flag, designated by the constant |
523 | .BR STATX__RESERVED , | |
524 | with the value 0x80000000U.) | |
aabbefb4 | 525 | .TP |
9905e59b | 526 | .B ELOOP |
835f4293 | 527 | Too many symbolic links encountered while traversing the pathname. |
9905e59b DH |
528 | .TP |
529 | .B ENAMETOOLONG | |
530 | .I pathname | |
531 | is too long. | |
532 | .TP | |
533 | .B ENOENT | |
534 | A component of | |
535 | .I pathname | |
536 | does not exist, or | |
537 | .I pathname | |
c8701baf MK |
538 | is an empty string and |
539 | .B AT_EMPTY_PATH | |
540 | was not specified in | |
541 | .IR flags . | |
9905e59b DH |
542 | .TP |
543 | .B ENOMEM | |
544 | Out of memory (i.e., kernel memory). | |
545 | .TP | |
546 | .B ENOTDIR | |
547 | A component of the path prefix of | |
548 | .I pathname | |
549 | is not a directory or | |
550 | .I pathname | |
551 | is relative and | |
552 | .I dirfd | |
553 | is a file descriptor referring to a file other than a directory. | |
554 | .SH VERSIONS | |
555 | .BR statx () | |
e06763fe | 556 | was added to Linux in kernel 4.11; library support was added in glibc 2.28. |
7a192d0d MK |
557 | .SH CONFORMING TO |
558 | .BR statx () | |
56a05af6 | 559 | is Linux-specific. |
9905e59b DH |
560 | .SH SEE ALSO |
561 | .BR ls (1), | |
562 | .BR stat (1), | |
563 | .BR access (2), | |
564 | .BR chmod (2), | |
565 | .BR chown (2), | |
728009a4 | 566 | .BR name_to_handle_at (2), |
9905e59b | 567 | .BR readlink (2), |
6edadda6 | 568 | .BR stat (2), |
9905e59b | 569 | .BR utime (2), |
728009a4 | 570 | .BR proc (5), |
9905e59b | 571 | .BR capabilities (7), |
3b363b62 | 572 | .BR inode (7), |
9905e59b | 573 | .BR symlink (7) |