Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ utimes(2) — DG/UX R4.11

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

lstat(2)

stat(2)

ustat(2)

utime(2)

stat(5)



utimes(2)                         SDK R4.11                        utimes(2)


NAME
       utimes - set file access and modification times

SYNOPSIS
       #include <sys/time.h>

       int  utimes (path, times)
       char * path;
       struct timeval times[2];

   where:
       path      Address of a pathname naming a file, which must reside on a
                 file system device mounted read-write

       times     Address of an initialized array of two time values giving
                 the access and modification times

DESCRIPTION
       Utimes sets the `time-last-accessed' and `time-last-modified'
       attributes of the subject file to times[0] and times[1] respectively.
       If path refers to a symbolic link, the target of the symbolic link is
       affected.

       If utimes fails, the file is left unchanged.  Otherwise, the `time-
       last-changed' attribute of the subject file is set to the current
       time.

ACCESS CONTROL
       The calling process must have permission to resolve path.

       The calling process must have appropriate privilege or its effective
       user id must be the user id of the subject file.  For systems
       supporting the DG/UX Capability Option, appropriate privilege is
       defined as having one or more specific capabilities enabled in the
       effective capability set of the calling process.  See capdefaults(5)
       for the default capability for this system call.

       On systems without the DG/UX Capability Option, appropriate privilege
       means that the process has an effective UID of root.  See the
       appropriateprivilege(5) man page for more information.

RETURN VALUE
       0      The file's access and modification times were changed
              successfully.

       -1     An error occurred.  errno is set to indicate the error.

DIAGNOSTICS
       Errno may be set to one of the following error codes:

       EFAULT         Some part of the array pointed to by times lies
                      outside the process's readable address space.

       EPERM          Permission to set the access and modification times to
                      an arbitrary value is denied to the calling process.

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

       ENOENT         The file the pathname resolved to does not exist.

       ENOENT         A non-terminal component of the pathname does not
                      exist.

       ENOTDIR        A non-terminal component of the pathname was not a
                      directory or symbolic link.

       ENAMETOOLONG   The pathname exceeds the length limit for pathnames.

       ENAMETOOLONG   A component of the pathname exceeds the length limit
                      for filenames.

       ENOMEM         There are not enough system resources to resolve the
                      pathname or to expand a symbolic link.

       ELOOP          The number of symbolic links encountered during
                      pathname resolution exceeded MAXSYMLINKS.  A symbolic
                      link cycle is suspected.

       EPERM          The pathname contains a character not in the allowed
                      character set.

       EFAULT         The pathname does not completely reside in the
                      process's address space or the pathname does not
                      terminate in the process's address space.

SEE ALSO
       dgmstat(2), lstat(2), stat(2), ustat(2), utime(2),
       appropriateprivilege(5), stat(5).
       capdefaults(5).


Licensed material--property of copyright holder(s)

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