1FUTIMES(3)                 Linux Programmer's Manual                FUTIMES(3)
2
3
4

NAME

6       futimes, lutimes - change file timestamps
7

SYNOPSIS

9       #include <sys/time.h>
10
11       int futimes(int fd, const struct timeval tv[2]);
12
13       int lutimes(const char *filename, const struct timeval tv[2]);
14
15   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
16
17       futimes(), lutimes():
18           Since glibc 2.19:
19               _DEFAULT_SOURCE
20           Glibc 2.19 and earlier:
21               _BSD_SOURCE
22

DESCRIPTION

24       futimes()  changes  the  access and modification times of a file in the
25       same way as utimes(2), with the difference that the  file  whose  time‐
26       stamps are to be changed is specified via a file descriptor, fd, rather
27       than via a pathname.
28
29       lutimes() changes the access and modification times of a  file  in  the
30       same way as utimes(2), with the difference that if filename refers to a
31       symbolic link, then the link is not dereferenced:  instead,  the  time‐
32       stamps of the symbolic link are changed.
33

RETURN VALUE

35       On  success,  zero is returned.  On error, -1 is returned, and errno is
36       set appropriately.
37

ERRORS

39       Errors  are  as  for  utimes(2),  with  the  following  additions   for
40       futimes():
41
42       EBADF  fd is not a valid file descriptor.
43
44       ENOSYS The /proc filesystem could not be accessed.
45
46       The following additional error may occur for lutimes():
47
48       ENOSYS The  kernel does not support this call; Linux 2.6.22 or later is
49              required.
50

VERSIONS

52       futimes() is available since glibc 2.3.  lutimes() is  available  since
53       glibc 2.6, and is implemented using the utimensat(2) system call, which
54       is supported since kernel 2.6.22.
55

ATTRIBUTES

57       For  an  explanation  of  the  terms  used   in   this   section,   see
58       attributes(7).
59
60       ┌─────────────────────┬───────────────┬─────────┐
61Interface            Attribute     Value   
62       ├─────────────────────┼───────────────┼─────────┤
63futimes(), lutimes() │ Thread safety │ MT-Safe │
64       └─────────────────────┴───────────────┴─────────┘

CONFORMING TO

66       These  functions  are not specified in any standard.  Other than Linux,
67       they are available only on the BSDs.
68

SEE ALSO

70       utime(2), utimensat(2), symlink(7)
71

COLOPHON

73       This page is part of release 4.15 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                             2017-09-15                        FUTIMES(3)
Impressum