utimes man page on BSDi

Man page or keyword search:  
man Server   6284 pages
apropos Keyword Search (all sections)
Output format
BSDi logo
[printable version]

UTIMES(2)		    BSD Programmer's Manual		     UTIMES(2)

NAME
     utimes - set file access and modification times

SYNOPSIS
     #include <time.h>

     int
     utimes(const char *file, const struct timeval *times);

DESCRIPTION
     The utimes() function sets the access and modification times of the named
     file from the structures in the argument array times.

     The first structure sets the access time, and the second sets the modifi-
     cation time.  If the times are not specified, the current time is used.

     If the times are specified (the times argument is non-NULL) the caller
     must be the owner of the file or be the super-user.

     If the times are not specified (the times argument is NULL) the caller
     must be the owner of the file, have permission to write the file, or be
     the super-user.

RETURN VALUES
     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
     Utimes() will fail if:

     [EACCES]	   Search permission is denied for a component of the path
		   prefix; or the times argument is NULL and the effective us-
		   er ID of the process does not match the owner of the file,
		   and is not the super-user, and write access is denied.

     [EFAULT]	   File or times points outside the process's allocated ad-
		   dress space.

     [EINVAL]	   The pathname contains a character with the high-order bit
		   set.

     [EIO]	   An I/O error occurred while reading or writing the affected
		   inode.

     [ELOOP]	   Too many symbolic links were encountered in translating the
		   pathname.

     [ENAMETOOLONG]
		   A component of a pathname exceeded 255 characters, or an
		   entire path name exceeded 1023 characters.

     [ENOENT]	   The named file does not exist.

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

     [EPERM]	   The times argument is not NULL and the calling process's
		   effective user ID does not match the owner of the file and
		   is not the super-user.

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

SEE ALSO
     stat(2)

HISTORY
     The utimes function call appeared in 4.2BSD.

4th Berkeley Distribution	 June 4, 1993				     2
[top]

List of man pages available for BSDi

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net