Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

stat(2)

UTIMES(2)  —  SYSTEM CALLS

NAME

utimes − set file times

SYNOPSIS

#include <sys/types.h>

utimes(file, tvp)
char ∗file;
struct timeval tvp[2];

DESCRIPTION

The utimes call uses the “accessed” and “updated” times in that order from the tvp vector to set the corresponding recorded times for file. 

The caller must be the owner of the file or the super-user.  The “inode-changed” time of the file is set to the current time. 

RETURN VALUE

Upon successful completion, a value of 0 is returned.  Otherwise, a value of −1 is returned and errno is set to indicate the error. 

ERRORS

utime will fail if one or more of the following are true:

ENOTDIR A component of the path prefix of file is not a directory. 

EINVAL file contained a character with the high-order bit set. 

ENAMETOOLONG
The length of a component of file exceeds 255 characters, or the length of file exceeds 1023 characters. 

ENOENT The file referred to by file does not exist. 

EACCES Search permission is denied for a component of the path prefix of file.

ELOOP Too many symbolic links were encountered in translating file.

EPERM The process is not super-user and not the owner of the file. 

EIO An I/O error occurred while reading from or writing to the file system. 

EROFS The file system containing the file is mounted read-only. 

EFAULT file or tvp points outside the process’s allocated address space. 

SEE ALSO

stat(2)

Sun Release 3.2  —  Last change: 16 July 1986

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026