1UTIMES(2)                     System Calls Manual                    UTIMES(2)
2
3
4

NAME

6       utimes - set file times
7

SYNOPSIS

9       #include <sys/time.h>
10
11       utimes(file, tvp)
12       char *file;
13       struct timeval tvp[2];
14

DESCRIPTION

16       The  utimes  call uses the “accessed” and “updated” times in that order
17       from the tvp vector to set the corresponding recorded times for file.
18
19       The caller must be the owner  of  the  file  or  the  super-user.   The
20       “inode-changed” time of the file is set to the current time.
21

RETURN VALUE

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

ERRORS

27       Utime will fail if one or more of the following are true:
28
29       [ENOTDIR]      A component of the path prefix is not a directory.
30
31       [EINVAL]       The pathname contains a character  with  the  high-order
32                      bit set.
33
34       [ENAMETOOLONG] A component of a pathname exceeded 255 characters, or an
35                      entire path name exceeded 1023 characters.
36
37       [ENOENT]       The named file does not exist.
38
39       [ELOOP]        Too many symbolic links were encountered in  translating
40                      the pathname.
41
42       [EPERM]        The  process  is not super-user and not the owner of the
43                      file.
44
45       [EACCES]       Search permission is denied for a component of the  path
46                      prefix.
47
48       [EROFS]        The  file  system  containing  the file is mounted read-
49                      only.
50
51       [EFAULT]       File or  tvp  points  outside  the  process's  allocated
52                      address space.
53
54       [EIO]          An  I/O  error  occurred  while  reading  or writing the
55                      affected inode.
56

SEE ALSO

58       stat(2)
59
60
61
624th Berkeley Distribution       August 26, 1985                      UTIMES(2)
Impressum