1FUTIMES(3) Linux Programmer's Manual FUTIMES(3)
2
3
4
6 futimes, lutimes - change file timestamps
7
9 #include <sys/time.h>
10
11 int futimes(int fd, const struct timeval tv[2]);
12 int lutimes(const char *filename, const struct timeval tv[2]);
13
14 Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
15
16 futimes(), lutimes():
17 Since glibc 2.19:
18 _DEFAULT_SOURCE
19 Glibc 2.19 and earlier:
20 _BSD_SOURCE
21
23 futimes() changes the access and modification times of a file in the
24 same way as utimes(2), with the difference that the file whose time‐
25 stamps are to be changed is specified via a file descriptor, fd, rather
26 than via a pathname.
27
28 lutimes() changes the access and modification times of a file in the
29 same way as utimes(2), with the difference that if filename refers to a
30 symbolic link, then the link is not dereferenced: instead, the time‐
31 stamps of the symbolic link are changed.
32
34 On success, zero is returned. On error, -1 is returned, and errno is
35 set to indicate the error.
36
38 Errors are as for utimes(2), with the following additions for fu‐
39 times():
40
41 EBADF fd is not a valid file descriptor.
42
43 ENOSYS The /proc filesystem could not be accessed.
44
45 The following additional error may occur for lutimes():
46
47 ENOSYS The kernel does not support this call; Linux 2.6.22 or later is
48 required.
49
51 futimes() is available since glibc 2.3. lutimes() is available since
52 glibc 2.6, and is implemented using the utimensat(2) system call, which
53 is supported since kernel 2.6.22.
54
56 For an explanation of the terms used in this section, see at‐
57 tributes(7).
58
59 ┌────────────────────────────────────────────┬───────────────┬─────────┐
60 │Interface │ Attribute │ Value │
61 ├────────────────────────────────────────────┼───────────────┼─────────┤
62 │futimes(), lutimes() │ Thread safety │ MT-Safe │
63 └────────────────────────────────────────────┴───────────────┴─────────┘
64
66 These functions are not specified in any standard. Other than Linux,
67 they are available only on the BSDs.
68
70 utime(2), utimensat(2), symlink(7)
71
73 This page is part of release 5.13 of the Linux man-pages project. A
74 description of the project, information about reporting bugs, and the
75 latest version of this page, can be found at
76 https://www.kernel.org/doc/man-pages/.
77
78
79
80Linux 2021-03-22 FUTIMES(3)