CINXE.COM
futimesat
<html> <head> <title>futimesat</title> <META NAME="KEYWORDS" CONTENT="futimesat"> </head> <body BGCOLOR="#ffffff" LINK="#0000ff" VLINK="#0000ff" ALINK="#0000ff" TEXT="#000000"> <center> <h1><b>futimesat</b></h1></center> <PRE> <STRONG><A HREF="/man2/FUTIMESAT">FUTIMESAT(2)</A></STRONG> Linux Programmer's Manual <STRONG><A HREF="/man2/FUTIMESAT">FUTIMESAT(2)</A></STRONG> NAME futimesat - change timestamps of a file relative to a directory file descriptor SYNOPSIS #include <fcntl.h> /* Definition of AT_* constants */ #include <sys/time.h> int futimesat(int dirfd, const char *pathname, const struct timeval times[2]); Feature Test Macro Requirements for glibc (see <STRONG><A HREF="/man7/feature_test_macros">feature_test_macros(7)</A></STRONG>): futimesat(): _GNU_SOURCE DESCRIPTION This system call is obsolete. Use <STRONG><A HREF="/man2/utimensat">utimensat(2)</A></STRONG> instead. The futimesat() system call operates in exactly the same way as <STRONG><A HREF="/man2/utimes">utimes(2)</A></STRONG>, except for the differences described in this manual page. If the pathname given in pathname is relative, then it is interpreted relative to the directory referred to by the file descriptor dirfd (rather than relative to the current working directory of the calling process, as is done by <STRONG><A HREF="/man2/utimes">utimes(2)</A></STRONG> for a relative pathname). If pathname is relative and dirfd is the special value AT_FDCWD, then pathname is interpreted relative to the current working directory of the calling process (like <STRONG><A HREF="/man2/utimes">utimes(2)</A></STRONG>). If pathname is absolute, then dirfd is ignored. RETURN VALUE On success, futimesat() returns a 0. On error, -1 is returned and er- rno is set to indicate the error. ERRORS The same errors that occur for <STRONG><A HREF="/man2/utimes">utimes(2)</A></STRONG> can also occur for futime- sat(). The following additional errors can occur for futimesat(): EBADF dirfd is not a valid file descriptor. ENOTDIR pathname is relative and dirfd is a file descriptor referring to a file other than a directory. VERSIONS futimesat() was added to Linux in kernel 2.6.16; library support was added to glibc in version 2.4. CONFORMING TO This system call is nonstandard. It was implemented from a specifica- tion that was proposed for POSIX.1, but that specification was replaced by the one for <STRONG><A HREF="/man2/utimensat">utimensat(2)</A></STRONG>. A similar system call exists on Solaris. NOTES Glibc notes If pathname is NULL, then the glibc futimesat() wrapper function up- dates the times for the file referred to by dirfd. SEE ALSO <STRONG><A HREF="/man2/stat">stat(2)</A></STRONG>, <STRONG><A HREF="/man2/utimensat">utimensat(2)</A></STRONG>, <STRONG><A HREF="/man2/utimes">utimes(2)</A></STRONG>, <STRONG><A HREF="/man3/futimes">futimes(3)</A></STRONG>, <STRONG><A HREF="/man7/path_resolution">path_resolution(7)</A></STRONG> COLOPHON This page is part of release 5.05 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. Linux 2017-09-15 <STRONG><A HREF="/man2/FUTIMESAT">FUTIMESAT(2)</A></STRONG></PRE> <center> <h6>Man Pages Copyright Respective Owners. Site Copyright (C) 1994 - 2025 <a href="http://www.he.net">Hurricane Electric</a>. All Rights Reserved.</h6></center> </body> </html>