Debian Codegraph @

templates/man2/utimensat.2.pot

raw
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2026-06-05 06:50+0200\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <[email protected]>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: TH
20 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
21 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
22 #, no-wrap
23 msgid "utimensat"
24 msgstr ""
25
26 #. type: TH
27 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
28 #: opensuse-tumbleweed
29 #, no-wrap
30 msgid "2025-10-29"
31 msgstr ""
32
33 #. type: TH
34 #: archlinux debian-unstable
35 #, no-wrap
36 msgid "Linux man-pages 6.18"
37 msgstr ""
38
39 #. type: SH
40 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
41 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
42 #, no-wrap
43 msgid "NAME"
44 msgstr ""
45
46 #. type: Plain text
47 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
48 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
49 msgid "utimensat, futimens - change file timestamps with nanosecond precision"
50 msgstr ""
51
52 #. type: SH
53 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
54 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
55 #, no-wrap
56 msgid "LIBRARY"
57 msgstr ""
58
59 #. type: Plain text
60 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
61 #: opensuse-leap-16-1 opensuse-tumbleweed
62 msgid "Standard C library (I<libc>,\\ I<-lc>)"
63 msgstr ""
64
65 #. type: SH
66 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
67 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
68 #, no-wrap
69 msgid "SYNOPSIS"
70 msgstr ""
71
72 #. type: Plain text
73 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
74 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
75 #, no-wrap
76 msgid ""
77 "B<#include E<lt>fcntl.hE<gt>> /* Definition of B<AT_*> constants */\n"
78 "B<#include E<lt>sys/stat.hE<gt>>\n"
79 msgstr ""
80
81 #. type: Plain text
82 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
83 #: opensuse-tumbleweed
84 #, no-wrap
85 msgid ""
86 "B<int utimensat(int >I<dirfd>B<, const char *>I<path>B<,>\n"
87 "B< const struct timespec >I<times>B<[_Nullable 2], int >I<flags>B<);>\n"
88 "B<int futimens(int >I<fd>B<, const struct timespec >I<times>B<[_Nullable 2]);>\n"
89 msgstr ""
90
91 #. type: Plain text
92 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
93 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
94 msgid ""
95 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
96 msgstr ""
97
98 #. type: Plain text
99 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
100 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
101 msgid "B<utimensat>():"
102 msgstr ""
103
104 #. type: Plain text
105 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
106 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
107 #, no-wrap
108 msgid ""
109 " Since glibc 2.10:\n"
110 " _POSIX_C_SOURCE E<gt>= 200809L\n"
111 " Before glibc 2.10:\n"
112 " _ATFILE_SOURCE\n"
113 msgstr ""
114
115 #. type: Plain text
116 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
117 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
118 msgid "B<futimens>():"
119 msgstr ""
120
121 #. type: Plain text
122 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
123 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
124 #, no-wrap
125 msgid ""
126 " Since glibc 2.10:\n"
127 " _POSIX_C_SOURCE E<gt>= 200809L\n"
128 " Before glibc 2.10:\n"
129 " _GNU_SOURCE\n"
130 msgstr ""
131
132 #. type: SH
133 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
134 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
135 #, no-wrap
136 msgid "DESCRIPTION"
137 msgstr ""
138
139 #. type: Plain text
140 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
141 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
142 msgid ""
143 "B<utimensat>() and B<futimens>() update the timestamps of a file with "
144 "nanosecond precision. This contrasts with the historical B<utime>(2) and "
145 "B<utimes>(2), which permit only second and microsecond precision, "
146 "respectively, when setting file timestamps."
147 msgstr ""
148
149 #. type: Plain text
150 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
151 #: opensuse-tumbleweed
152 msgid ""
153 "With B<utimensat>() the file is specified via the pathname given in "
154 "I<path>. With B<futimens>() the file whose timestamps are to be updated is "
155 "specified via an open file descriptor, I<fd>."
156 msgstr ""
157
158 #. type: Plain text
159 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
160 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
161 msgid ""
162 "For both calls, the new file timestamps are specified in the array I<times>: "
163 "I<times[0]> specifies the new \"last access time\" (I<atime>); I<times[1]> "
164 "specifies the new \"last modification time\" (I<mtime>). Each of the "
165 "elements of I<times> specifies a time as the number of seconds and "
166 "nanoseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). This "
167 "information is conveyed in a B<timespec>(3) structure."
168 msgstr ""
169
170 #. type: Plain text
171 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
172 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
173 msgid ""
174 "Updated file timestamps are set to the greatest value supported by the "
175 "filesystem that is not greater than the specified time."
176 msgstr ""
177
178 #. 2.6.22 was broken: it is not ignored
179 #. type: Plain text
180 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
181 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
182 msgid ""
183 "If the I<tv_nsec> field of one of the I<timespec> structures has the special "
184 "value B<UTIME_NOW>, then the corresponding file timestamp is set to the "
185 "current time. If the I<tv_nsec> field of one of the I<timespec> structures "
186 "has the special value B<UTIME_OMIT>, then the corresponding file timestamp "
187 "is left unchanged. In both of these cases, the value of the corresponding "
188 "I<tv_sec> field is ignored."
189 msgstr ""
190
191 #. type: Plain text
192 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
193 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
194 msgid "If I<times> is NULL, then both timestamps are set to the current time."
195 msgstr ""
196
197 #. type: Plain text
198 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
199 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
200 msgid ""
201 "The status change time (ctime) will be set to the current time, even if the "
202 "other time stamps don't actually change."
203 msgstr ""
204
205 #. type: SS
206 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
207 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
208 #, no-wrap
209 msgid "Permissions requirements"
210 msgstr ""
211
212 #. type: Plain text
213 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
214 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
215 msgid ""
216 "To set both file timestamps to the current time (i.e., I<times> is NULL, or "
217 "both I<tv_nsec> fields specify B<UTIME_NOW>), either:"
218 msgstr ""
219
220 #. type: IP
221 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
222 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
223 #, no-wrap
224 msgid "\\[bu]"
225 msgstr ""
226
227 #. 2.6.22 was broken here -- for futimens() the check is
228 #. based on whether or not the file descriptor is writable,
229 #. not on whether the caller's effective UID has write
230 #. permission for the file referred to by the descriptor.
231 #. type: Plain text
232 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
233 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
234 msgid "the caller must have write access to the file;"
235 msgstr ""
236
237 #. type: Plain text
238 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
239 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
240 msgid "the caller's effective user ID must match the owner of the file; or"
241 msgstr ""
242
243 #. type: Plain text
244 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
245 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
246 msgid "the caller must have appropriate privileges."
247 msgstr ""
248
249 #. 2.6.22 was broken here:
250 #. both must be something other than *either* UTIME_OMIT *or* UTIME_NOW.
251 #. type: Plain text
252 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
253 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
254 msgid ""
255 "To make any change other than setting both timestamps to the current time "
256 "(i.e., I<times> is not NULL, and neither I<tv_nsec> field is B<UTIME_NOW> "
257 "and neither I<tv_nsec> field is B<UTIME_OMIT>), either condition 2 or 3 "
258 "above must apply."
259 msgstr ""
260
261 #. type: Plain text
262 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
263 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
264 msgid ""
265 "If both I<tv_nsec> fields are specified as B<UTIME_OMIT>, then no file "
266 "ownership or permission checks are performed, and the file timestamps are "
267 "not modified, but other error conditions may still be detected."
268 msgstr ""
269
270 #. type: SS
271 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
272 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
273 #, no-wrap
274 msgid "utimensat() specifics"
275 msgstr ""
276
277 #. type: Plain text
278 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
279 #: opensuse-tumbleweed
280 msgid ""
281 "If I<path> is relative, then by default it is interpreted relative to the "
282 "directory referred to by the open file descriptor, I<dirfd> (rather than "
283 "relative to the current working directory of the calling process, as is done "
284 "by B<utimes>(2) for a relative pathname). See B<openat>(2) for an "
285 "explanation of why this can be useful."
286 msgstr ""
287
288 #. type: Plain text
289 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
290 #: opensuse-tumbleweed
291 msgid ""
292 "If I<path> is relative and I<dirfd> is the special value B<AT_FDCWD>, then "
293 "I<path> is interpreted relative to the current working directory of the "
294 "calling process (like B<utimes>(2))."
295 msgstr ""
296
297 #. type: Plain text
298 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
299 #: opensuse-tumbleweed
300 msgid "If I<path> is absolute, then I<dirfd> is ignored."
301 msgstr ""
302
303 #. type: Plain text
304 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
305 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
306 msgid ""
307 "The I<flags> argument is a bit mask created by ORing together zero or more "
308 "of the following values defined in I<E<lt>fcntl.hE<gt>>:"
309 msgstr ""
310
311 #. type: TP
312 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
313 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
314 #, no-wrap
315 msgid "B<AT_EMPTY_PATH> (since Linux 5.8)"
316 msgstr ""
317
318 #. type: Plain text
319 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
320 #: opensuse-tumbleweed
321 msgid ""
322 "If I<path> is an empty string, operate on the file referred to by I<dirfd> "
323 "(which may have been obtained using the B<open>(2) B<O_PATH> flag). In "
324 "this case, I<dirfd> can refer to any type of file, not just a directory. If "
325 "I<dirfd> is B<AT_FDCWD>, the call operates on the current working "
326 "directory. This flag is Linux-specific; define B<_GNU_SOURCE> to obtain its "
327 "definition."
328 msgstr ""
329
330 #. type: TP
331 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
332 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
333 #, no-wrap
334 msgid "B<AT_SYMLINK_NOFOLLOW>"
335 msgstr ""
336
337 #. type: Plain text
338 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
339 #: opensuse-tumbleweed
340 msgid ""
341 "If I<path> specifies a symbolic link, then update the timestamps of the "
342 "link, rather than the file to which it refers."
343 msgstr ""
344
345 #. type: SH
346 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
347 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
348 #, no-wrap
349 msgid "RETURN VALUE"
350 msgstr ""
351
352 #. type: Plain text
353 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
354 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
355 msgid ""
356 "On success, B<utimensat>() and B<futimens>() return 0. On error, -1 is "
357 "returned and I<errno> is set to indicate the error."
358 msgstr ""
359
360 #. type: SH
361 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
362 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
363 #, no-wrap
364 msgid "ERRORS"
365 msgstr ""
366
367 #. type: TP
368 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
369 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
370 #, no-wrap
371 msgid "B<EACCES>"
372 msgstr ""
373
374 #
375 #. But Linux 2.6.22 was broken here.
376 #. Traditionally, utime()/utimes() gives the error EACCES for the case
377 #. where the timestamp pointer argument is NULL (i.e., set both timestamps
378 #. to the current time), and the file is owned by a user other than the
379 #. effective UID of the caller, and the file is not writable by the
380 #. effective UID of the program. utimensat() also gives this error in the
381 #. same case. However, in the same circumstances, when utimensat() is
382 #. given a 'times' array in which both tv_nsec fields are UTIME_NOW, which
383 #. provides equivalent functionality to specifying 'times' as NULL, the
384 #. call succeeds. It should fail with the error EACCES in this case.
385 #. POSIX.1-2008 has the following:
386 #. .TP
387 #. .B EACCES
388 #. .RB ( utimensat ())
389 #. .I fd
390 #. was not opened with
391 #. .B O_SEARCH
392 #. and the permissions of the directory to which
393 #. .I fd
394 #. refers do not allow searches.
395 #. EXT2_IMMUTABLE_FL and similar flags for other filesystems.
396 #. type: Plain text
397 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
398 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
399 msgid ""
400 "I<times> is NULL, or both I<tv_nsec> values are B<UTIME_NOW>, and the "
401 "effective user ID of the caller does not match the owner of the file, the "
402 "caller does not have write access to the file, and the caller is not "
403 "privileged (Linux: does not have either the B<CAP_FOWNER> or the "
404 "B<CAP_DAC_OVERRIDE> capability)."
405 msgstr ""
406
407 #. type: TP
408 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
409 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
410 #, no-wrap
411 msgid "B<EBADF>"
412 msgstr ""
413
414 #. type: Plain text
415 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
416 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
417 msgid "(B<futimens>()) I<fd> is not a valid file descriptor."
418 msgstr ""
419
420 #. type: Plain text
421 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
422 #: opensuse-tumbleweed
423 msgid ""
424 "(B<utimensat>()) I<path> is relative but I<dirfd> is neither B<AT_FDCWD> "
425 "nor a valid file descriptor."
426 msgstr ""
427
428 #. type: TP
429 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
430 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
431 #, no-wrap
432 msgid "B<EFAULT>"
433 msgstr ""
434
435 #. type: Plain text
436 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
437 #: opensuse-tumbleweed
438 msgid ""
439 "I<times> pointed to an invalid address; or, I<dirfd> was B<AT_FDCWD>, and "
440 "I<path> is NULL or an invalid address."
441 msgstr ""
442
443 #. type: TP
444 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
445 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
446 #, no-wrap
447 msgid "B<EINVAL>"
448 msgstr ""
449
450 #. type: Plain text
451 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
452 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
453 msgid "Invalid value in I<flags>."
454 msgstr ""
455
456 #. type: Plain text
457 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
458 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
459 msgid ""
460 "Invalid value in one of the I<tv_nsec> fields (value outside range [0, "
461 "999,999,999], and not B<UTIME_NOW> or B<UTIME_OMIT>); or an invalid value in "
462 "one of the I<tv_sec> fields."
463 msgstr ""
464
465 #. SUSv4 does not specify this error.
466 #. type: Plain text
467 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
468 #: opensuse-tumbleweed
469 msgid ""
470 "I<path> is NULL, I<dirfd> is not B<AT_FDCWD>, and I<flags> contains "
471 "B<AT_SYMLINK_NOFOLLOW>."
472 msgstr ""
473
474 #. type: TP
475 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
476 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
477 #, no-wrap
478 msgid "B<ELOOP>"
479 msgstr ""
480
481 #. type: Plain text
482 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
483 #: opensuse-tumbleweed
484 msgid ""
485 "(B<utimensat>()) Too many symbolic links were encountered in resolving "
486 "I<path>."
487 msgstr ""
488
489 #. type: TP
490 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
491 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
492 #, no-wrap
493 msgid "B<ENAMETOOLONG>"
494 msgstr ""
495
496 #. type: Plain text
497 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
498 #: opensuse-tumbleweed
499 msgid "(B<utimensat>()) I<path> is too long."
500 msgstr ""
501
502 #. type: TP
503 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
504 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
505 #, no-wrap
506 msgid "B<ENOENT>"
507 msgstr ""
508
509 #. type: Plain text
510 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
511 #: opensuse-tumbleweed
512 msgid ""
513 "(B<utimensat>()) A component of I<path> does not refer to an existing "
514 "directory or file, or I<path> is an empty string."
515 msgstr ""
516
517 #. type: TP
518 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
519 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
520 #, no-wrap
521 msgid "B<ENOTDIR>"
522 msgstr ""
523
524 #. type: Plain text
525 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
526 #: opensuse-tumbleweed
527 msgid ""
528 "(B<utimensat>()) I<path> is relative, but I<dirfd> is neither B<AT_FDCWD> "
529 "nor a file descriptor referring to a directory; or, one of the prefix "
530 "components of I<path> is not a directory."
531 msgstr ""
532
533 #. type: TP
534 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
535 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
536 #, no-wrap
537 msgid "B<EPERM>"
538 msgstr ""
539
540 #. type: Plain text
541 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
542 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
543 msgid ""
544 "The caller attempted to change one or both timestamps to a value other than "
545 "the current time, or to change one of the timestamps to the current time "
546 "while leaving the other timestamp unchanged, (i.e., I<times> is not NULL, "
547 "neither I<tv_nsec> field is B<UTIME_NOW>, and neither I<tv_nsec> field is "
548 "B<UTIME_OMIT>) and either:"
549 msgstr ""
550
551 #. type: Plain text
552 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
553 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
554 msgid ""
555 "the caller's effective user ID does not match the owner of file, and the "
556 "caller is not privileged (Linux: does not have the B<CAP_FOWNER> "
557 "capability); or,"
558 msgstr ""
559
560 #
561 #. Linux 2.6.22 was broken here:
562 #. it was not consistent with the old utimes() implementation,
563 #. since the case when both tv_nsec fields are UTIME_NOW, was not
564 #. treated like the (times == NULL) case.
565 #. EXT2_IMMUTABLE_FL EXT_APPEND_FL and similar flags for
566 #. other filesystems.
567 #. Why the inconsistency (which is described under NOTES) between
568 #. EACCES and EPERM, where only EPERM tests for append-only.
569 #. (This was also so for the older utimes() implementation.)
570 #. type: Plain text
571 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
572 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
573 msgid "the file is marked append-only or immutable (see B<chattr>(1))."
574 msgstr ""
575
576 #. type: TP
577 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
578 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
579 #, no-wrap
580 msgid "B<EROFS>"
581 msgstr ""
582
583 #. type: Plain text
584 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
585 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
586 msgid "The file is on a read-only filesystem."
587 msgstr ""
588
589 #. type: TP
590 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
591 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
592 #, no-wrap
593 msgid "B<ESRCH>"
594 msgstr ""
595
596 #. type: Plain text
597 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
598 #: opensuse-tumbleweed
599 msgid ""
600 "(B<utimensat>()) Search permission is denied for one of the prefix "
601 "components of I<path>."
602 msgstr ""
603
604 #. type: SH
605 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
606 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
607 #, no-wrap
608 msgid "ATTRIBUTES"
609 msgstr ""
610
611 #. type: Plain text
612 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
613 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
614 msgid ""
615 "For an explanation of the terms used in this section, see B<attributes>(7)."
616 msgstr ""
617
618 #. type: tbl table
619 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
620 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
621 #, no-wrap
622 msgid "Interface"
623 msgstr ""
624
625 #. type: tbl table
626 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
627 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
628 #, no-wrap
629 msgid "Attribute"
630 msgstr ""
631
632 #. type: tbl table
633 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
634 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
635 #, no-wrap
636 msgid "Value"
637 msgstr ""
638
639 #. type: tbl table
640 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
641 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
642 #, no-wrap
643 msgid ".na\n"
644 msgstr ""
645
646 #. type: tbl table
647 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
648 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
649 #, no-wrap
650 msgid ".nh\n"
651 msgstr ""
652
653 #. type: tbl table
654 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
655 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
656 #, no-wrap
657 msgid ""
658 "B<utimensat>(),\n"
659 "B<futimens>()"
660 msgstr ""
661
662 #. type: tbl table
663 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
664 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
665 #, no-wrap
666 msgid "Thread safety"
667 msgstr ""
668
669 #. type: tbl table
670 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
671 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
672 #, no-wrap
673 msgid "MT-Safe"
674 msgstr ""
675
676 #. type: SH
677 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
678 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
679 #, no-wrap
680 msgid "VERSIONS"
681 msgstr ""
682
683 #. type: SS
684 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
685 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
686 #, no-wrap
687 msgid "C library/kernel ABI differences"
688 msgstr ""
689
690 #. type: Plain text
691 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
692 #: opensuse-tumbleweed
693 msgid ""
694 "On Linux, B<futimens>() is a library function implemented on top of the "
695 "B<utimensat>() system call. To support this, the Linux B<utimensat>() "
696 "system call implements a nonstandard feature: if I<path> is NULL, then the "
697 "call modifies the timestamps of the file referred to by the file descriptor "
698 "I<dirfd> (which may refer to any type of file). Using this feature, the "
699 "call I<futimens(fd,\\ times)> is implemented as:"
700 msgstr ""
701
702 #. type: Plain text
703 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
704 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
705 #, no-wrap
706 msgid "utimensat(fd, NULL, times, 0);\n"
707 msgstr ""
708
709 #. type: Plain text
710 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
711 #: opensuse-tumbleweed
712 msgid ""
713 "Note, however, that the glibc wrapper for B<utimensat>() disallows passing "
714 "NULL as the value for I<path>: the wrapper function returns the error "
715 "B<EINVAL> in this case."
716 msgstr ""
717
718 #. type: SH
719 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
720 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
721 #, no-wrap
722 msgid "STANDARDS"
723 msgstr ""
724
725 #. type: Plain text
726 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
727 #: opensuse-tumbleweed
728 msgid "POSIX.1-2024."
729 msgstr ""
730
731 #. type: SH
732 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
733 #: opensuse-tumbleweed
734 #, no-wrap
735 msgid "HISTORY"
736 msgstr ""
737
738 #. type: TP
739 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
740 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
741 #, no-wrap
742 msgid "B<utimensat>()"
743 msgstr ""
744
745 #. type: Plain text
746 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
747 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
748 msgid "Linux 2.6.22, glibc 2.6. POSIX.1-2008."
749 msgstr ""
750
751 #. type: TP
752 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
753 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
754 #, no-wrap
755 msgid "B<futimens>()"
756 msgstr ""
757
758 #. type: Plain text
759 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
760 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
761 msgid "glibc 2.6. POSIX.1-2008."
762 msgstr ""
763
764 #. type: SH
765 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
766 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
767 #, no-wrap
768 msgid "NOTES"
769 msgstr ""
770
771 #. type: Plain text
772 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
773 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
774 msgid "B<utimensat>() obsoletes B<futimesat>(2)."
775 msgstr ""
776
777 #. type: Plain text
778 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
779 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
780 msgid ""
781 "On Linux, timestamps cannot be changed for a file marked immutable, and the "
782 "only change permitted for files marked append-only is to set the timestamps "
783 "to the current time. (This is consistent with the historical behavior of "
784 "B<utime>(2) and B<utimes>(2) on Linux.)"
785 msgstr ""
786
787 #. type: Plain text
788 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
789 #: opensuse-tumbleweed
790 msgid ""
791 "If both I<tv_nsec> fields are specified as B<UTIME_OMIT>, then the Linux "
792 "implementation of B<utimensat>() succeeds even if the file referred to by "
793 "I<dirfd> and I<path> does not exist."
794 msgstr ""
795
796 #. type: SH
797 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
798 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
799 #, no-wrap
800 msgid "BUGS"
801 msgstr ""
802
803 #. type: Plain text
804 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
805 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
806 msgid ""
807 "Several bugs afflict B<utimensat>() and B<futimens>() before Linux "
808 "2.6.26. These bugs are either nonconformances with the POSIX.1 draft "
809 "specification or inconsistencies with historical Linux behavior."
810 msgstr ""
811
812 #. type: Plain text
813 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
814 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
815 msgid ""
816 "POSIX.1 specifies that if one of the I<tv_nsec> fields has the value "
817 "B<UTIME_NOW> or B<UTIME_OMIT>, then the value of the corresponding I<tv_sec> "
818 "field should be ignored. Instead, the value of the I<tv_sec> field is "
819 "required to be 0 (or the error B<EINVAL> results)."
820 msgstr ""
821
822 #. Below, the long description of the errors from the previous bullet
823 #. point (abridged because it's too much detail for a man page).
824 #. .IP \[bu]
825 #. If one of the
826 #. .I tv_nsec
827 #. fields is
828 #. .BR UTIME_OMIT
829 #. and the other is
830 #. .BR UTIME_NOW ,
831 #. then the error
832 #. .B EPERM
833 #. should occur if the process's effective user ID does not match
834 #. the file owner and the process is not privileged.
835 #. Instead, the call successfully changes one of the timestamps.
836 #. .IP \[bu]
837 #. If file is not writable by the effective user ID of the process and
838 #. the process's effective user ID does not match the file owner and
839 #. the process is not privileged,
840 #. and
841 #. .I times
842 #. is NULL, then the error
843 #. .B EACCES
844 #. results.
845 #. This error should also occur if
846 #. .I times
847 #. points to an array of structures in which both
848 #. .I tv_nsec
849 #. fields are
850 #. .BR UTIME_NOW .
851 #. Instead the call succeeds.
852 #. .IP \[bu]
853 #. If a file is marked as append-only (see
854 #. .BR chattr (1)),
855 #. then Linux traditionally
856 #. (i.e.,
857 #. .BR utime (2),
858 #. .BR utimes (2)),
859 #. permits a NULL
860 #. .I times
861 #. argument to be used in order to update both timestamps to the current time.
862 #. For consistency,
863 #. .BR utimensat ()
864 #. and
865 #. .BR futimens ()
866 #. should also produce the same result when given a
867 #. .I times
868 #. argument that points to an array of structures in which both
869 #. .I tv_nsec
870 #. fields are
871 #. .BR UTIME_NOW .
872 #. Instead, the call fails with the error
873 #. .BR EPERM .
874 #. .IP \[bu]
875 #. If a file is marked as immutable (see
876 #. .BR chattr (1)),
877 #. then Linux traditionally
878 #. (i.e.,
879 #. .BR utime (2),
880 #. .BR utimes (2)),
881 #. gives an
882 #. .B EACCES
883 #. error if
884 #. .I times
885 #. is NULL.
886 #. For consistency,
887 #. .BR utimensat ()
888 #. and
889 #. .BR futimens ()
890 #. should also produce the same result when given a
891 #. .I times
892 #. that points to an array of structures in which both
893 #. .I tv_nsec
894 #. fields are
895 #. .BR UTIME_NOW .
896 #. Instead, the call fails with the error
897 #. .BR EPERM .
898 #. type: Plain text
899 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
900 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
901 msgid ""
902 "Various bugs mean that for the purposes of permission checking, the case "
903 "where both I<tv_nsec> fields are set to B<UTIME_NOW> isn't always treated "
904 "the same as specifying I<times> as NULL, and the case where one I<tv_nsec> "
905 "value is B<UTIME_NOW> and the other is B<UTIME_OMIT> isn't treated the same "
906 "as specifying I<times> as a pointer to an array of structures containing "
907 "arbitrary time values. As a result, in some cases: a) file timestamps can "
908 "be updated by a process that shouldn't have permission to perform updates; "
909 "b) file timestamps can't be updated by a process that should have permission "
910 "to perform updates; and c) the wrong I<errno> value is returned in case of "
911 "an error."
912 msgstr ""
913
914 #. This means that a process with a file descriptor that allows
915 #. writing could change the timestamps of a file for which it
916 #. does not have write permission;
917 #. conversely, a process with a read-only file descriptor won't
918 #. be able to update the timestamps of a file,
919 #. even if it has write permission on the file.
920 #. type: Plain text
921 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
922 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
923 msgid ""
924 "POSIX.1 says that a process that has I<write access to the file> can make a "
925 "call with I<times> as NULL, or with I<times> pointing to an array of "
926 "structures in which both I<tv_nsec> fields are B<UTIME_NOW>, in order to "
927 "update both timestamps to the current time. However, B<futimens>() instead "
928 "checks whether the I<access mode of the file descriptor allows writing>."
929 msgstr ""
930
931 #. type: SH
932 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
933 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
934 #, no-wrap
935 msgid "SEE ALSO"
936 msgstr ""
937
938 #. type: Plain text
939 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
940 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
941 msgid ""
942 "B<chattr>(1), B<touch>(1), B<futimesat>(2), B<openat>(2), B<stat>(2), "
943 "B<utimes>(2), B<futimes>(3), B<timespec>(3), B<inode>(7), "
944 "B<path_resolution>(7), B<symlink>(7)"
945 msgstr ""
946
947 #. type: TH
948 #: debian-trixie
949 #, no-wrap
950 msgid "2024-05-02"
951 msgstr ""
952
953 #. type: TH
954 #: debian-trixie
955 #, no-wrap
956 msgid "Linux man-pages 6.9.1"
957 msgstr ""
958
959 #. type: Plain text
960 #: debian-trixie
961 msgid "Standard C library (I<libc>, I<-lc>)"
962 msgstr ""
963
964 #. type: Plain text
965 #: debian-trixie fedora-44 fedora-rawhide
966 #, no-wrap
967 msgid ""
968 "B<int utimensat(int >I<dirfd>B<, const char *>I<pathname>B<,>\n"
969 "B< const struct timespec >I<times>B<[_Nullable 2], int >I<flags>B<);>\n"
970 "B<int futimens(int >I<fd>B<, const struct timespec >I<times>B<[_Nullable 2]);>\n"
971 msgstr ""
972
973 #. type: Plain text
974 #: debian-trixie fedora-44 fedora-rawhide
975 msgid ""
976 "With B<utimensat>() the file is specified via the pathname given in "
977 "I<pathname>. With B<futimens>() the file whose timestamps are to be "
978 "updated is specified via an open file descriptor, I<fd>."
979 msgstr ""
980
981 #. type: Plain text
982 #: debian-trixie fedora-44 fedora-rawhide
983 msgid ""
984 "If I<pathname> is relative, then by default it is interpreted relative to "
985 "the directory referred to by the open file descriptor, I<dirfd> (rather than "
986 "relative to the current working directory of the calling process, as is done "
987 "by B<utimes>(2) for a relative pathname). See B<openat>(2) for an "
988 "explanation of why this can be useful."
989 msgstr ""
990
991 #. type: Plain text
992 #: debian-trixie fedora-44 fedora-rawhide
993 msgid ""
994 "If I<pathname> is relative and I<dirfd> is the special value B<AT_FDCWD>, "
995 "then I<pathname> is interpreted relative to the current working directory of "
996 "the calling process (like B<utimes>(2))."
997 msgstr ""
998
999 #. type: Plain text
1000 #: debian-trixie fedora-44 fedora-rawhide
1001 msgid "If I<pathname> is absolute, then I<dirfd> is ignored."
1002 msgstr ""
1003
1004 #. type: Plain text
1005 #: debian-trixie fedora-44 fedora-rawhide
1006 msgid ""
1007 "If I<pathname> is an empty string, operate on the file referred to by "
1008 "I<dirfd> (which may have been obtained using the B<open>(2) B<O_PATH> "
1009 "flag). In this case, I<dirfd> can refer to any type of file, not just a "
1010 "directory. If I<dirfd> is B<AT_FDCWD>, the call operates on the current "
1011 "working directory. This flag is Linux-specific; define B<_GNU_SOURCE> to "
1012 "obtain its definition."
1013 msgstr ""
1014
1015 #. type: Plain text
1016 #: debian-trixie fedora-44 fedora-rawhide
1017 msgid ""
1018 "If I<pathname> specifies a symbolic link, then update the timestamps of the "
1019 "link, rather than the file to which it refers."
1020 msgstr ""
1021
1022 #. type: Plain text
1023 #: debian-trixie fedora-44 fedora-rawhide
1024 msgid ""
1025 "(B<utimensat>()) I<pathname> is relative but I<dirfd> is neither "
1026 "B<AT_FDCWD> nor a valid file descriptor."
1027 msgstr ""
1028
1029 #. type: Plain text
1030 #: debian-trixie fedora-44 fedora-rawhide
1031 msgid ""
1032 "I<times> pointed to an invalid address; or, I<dirfd> was B<AT_FDCWD>, and "
1033 "I<pathname> is NULL or an invalid address."
1034 msgstr ""
1035
1036 #. SUSv4 does not specify this error.
1037 #. type: Plain text
1038 #: debian-trixie fedora-44 fedora-rawhide
1039 msgid ""
1040 "I<pathname> is NULL, I<dirfd> is not B<AT_FDCWD>, and I<flags> contains "
1041 "B<AT_SYMLINK_NOFOLLOW>."
1042 msgstr ""
1043
1044 #. type: Plain text
1045 #: debian-trixie fedora-44 fedora-rawhide
1046 msgid ""
1047 "(B<utimensat>()) Too many symbolic links were encountered in resolving "
1048 "I<pathname>."
1049 msgstr ""
1050
1051 #. type: Plain text
1052 #: debian-trixie fedora-44 fedora-rawhide
1053 msgid "(B<utimensat>()) I<pathname> is too long."
1054 msgstr ""
1055
1056 #. type: Plain text
1057 #: debian-trixie fedora-44 fedora-rawhide
1058 msgid ""
1059 "(B<utimensat>()) A component of I<pathname> does not refer to an existing "
1060 "directory or file, or I<pathname> is an empty string."
1061 msgstr ""
1062
1063 #. type: Plain text
1064 #: debian-trixie fedora-44 fedora-rawhide
1065 msgid ""
1066 "(B<utimensat>()) I<pathname> is a relative pathname, but I<dirfd> is "
1067 "neither B<AT_FDCWD> nor a file descriptor referring to a directory; or, one "
1068 "of the prefix components of I<pathname> is not a directory."
1069 msgstr ""
1070
1071 #. type: Plain text
1072 #: debian-trixie fedora-44 fedora-rawhide
1073 msgid ""
1074 "(B<utimensat>()) Search permission is denied for one of the prefix "
1075 "components of I<pathname>."
1076 msgstr ""
1077
1078 #. type: Plain text
1079 #: debian-trixie fedora-44 fedora-rawhide
1080 msgid ""
1081 "On Linux, B<futimens>() is a library function implemented on top of the "
1082 "B<utimensat>() system call. To support this, the Linux B<utimensat>() "
1083 "system call implements a nonstandard feature: if I<pathname> is NULL, then "
1084 "the call modifies the timestamps of the file referred to by the file "
1085 "descriptor I<dirfd> (which may refer to any type of file). Using this "
1086 "feature, the call I<futimens(fd,\\ times)> is implemented as:"
1087 msgstr ""
1088
1089 #. type: Plain text
1090 #: debian-trixie fedora-44 fedora-rawhide
1091 msgid ""
1092 "Note, however, that the glibc wrapper for B<utimensat>() disallows passing "
1093 "NULL as the value for I<pathname>: the wrapper function returns the error "
1094 "B<EINVAL> in this case."
1095 msgstr ""
1096
1097 #. type: Plain text
1098 #: debian-trixie fedora-44 fedora-rawhide
1099 msgid "POSIX.1-2008."
1100 msgstr ""
1101
1102 #. type: Plain text
1103 #: debian-trixie fedora-44 fedora-rawhide
1104 msgid ""
1105 "If both I<tv_nsec> fields are specified as B<UTIME_OMIT>, then the Linux "
1106 "implementation of B<utimensat>() succeeds even if the file referred to by "
1107 "I<dirfd> and I<pathname> does not exist."
1108 msgstr ""
1109
1110 #. type: TH
1111 #: fedora-44 fedora-rawhide
1112 #, no-wrap
1113 msgid "2024-07-23"
1114 msgstr ""
1115
1116 #. type: TH
1117 #: fedora-44 fedora-rawhide
1118 #, no-wrap
1119 msgid "Linux man-pages 6.13"
1120 msgstr ""
1121
1122 #. type: TH
1123 #: mageia-cauldron
1124 #, no-wrap
1125 msgid "Linux man-pages 6.17"
1126 msgstr ""
1127
1128 #. type: TH
1129 #: opensuse-leap-16-1 opensuse-tumbleweed
1130 #, no-wrap
1131 msgid "Linux man-pages (unreleased)"
1132 msgstr ""