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

NAME

6       futimesat  -  change  timestamps of a file relative to a directory file
7       descriptor
8

SYNOPSIS

10       #include <fcntl.h>            /* Definition of AT_* constants */
11       #include <sys/time.h>
12
13       int futimesat(int dirfd, const char *pathname,
14                     const struct timeval times[2]);
15
16   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
17
18       futimesat():
19           _GNU_SOURCE
20

DESCRIPTION

22       This system call is obsolete.  Use utimensat(2) instead.
23
24       The futimesat() system  call  operates  in  exactly  the  same  way  as
25       utimes(2), except for the differences described in this manual page.
26
27       If  the  pathname given in pathname is relative, then it is interpreted
28       relative to the directory referred to  by  the  file  descriptor  dirfd
29       (rather  than  relative to the current working directory of the calling
30       process, as is done by utimes(2) for a relative pathname).
31
32       If pathname is relative and dirfd is the special value  AT_FDCWD,  then
33       pathname  is  interpreted  relative to the current working directory of
34       the calling process (like utimes(2)).
35
36       If pathname is absolute, then dirfd is ignored.  (See openat(2) for  an
37       explanation of why the dirfd argument is useful.)
38

RETURN VALUE

40       On  success, futimesat() returns a 0.  On error, -1 is returned and er‐
41       rno is set to indicate the error.
42

ERRORS

44       The same errors that occur for utimes(2) can  also  occur  for  futime‐
45       sat().  The following additional errors can occur for futimesat():
46
47       EBADF  pathname  is  relative but dirfd is neither AT_FDCWD nor a valid
48              file descriptor.
49
50       ENOTDIR
51              pathname is relative and dirfd is a file descriptor referring to
52              a file other than a directory.
53

VERSIONS

55       futimesat()  was  added  to Linux in kernel 2.6.16; library support was
56       added to glibc in version 2.4.
57

CONFORMING TO

59       This system call is nonstandard.  It was implemented from a  specifica‐
60       tion that was proposed for POSIX.1, but that specification was replaced
61       by the one for utimensat(2).
62
63       A similar system call exists on Solaris.
64

NOTES

66   Glibc notes
67       If pathname is NULL, then the glibc futimesat()  wrapper  function  up‐
68       dates the times for the file referred to by dirfd.
69

SEE ALSO

71       stat(2), utimensat(2), utimes(2), futimes(3), path_resolution(7)
72

COLOPHON

74       This  page  is  part of release 5.13 of the Linux man-pages project.  A
75       description of the project, information about reporting bugs,  and  the
76       latest     version     of     this    page,    can    be    found    at
77       https://www.kernel.org/doc/man-pages/.
78
79
80
81Linux                             2021-08-27                      FUTIMESAT(2)
Impressum